import json
import sys
import csv
import pandas as pd
from forex_python.converter import CurrencyRates
from datetime import datetime


def main():
  now= datetime.now()
  print(now.strftime('%Y-%m-%d %H:%M:%S'))

  c = CurrencyRates()
  currencyData = c.get_rates('USD')
  df = pd.DataFrame.from_dict(currencyData, orient='index')
  df.columns = ['ExRate']
  df.to_csv('ExchangeRates.csv', index_label='Currency')

  print("Currency csv created")

main()

b009e38039d4faa5c66bde49e47630cb89926b13
<mask token>

<mask token>


def main():
    now = datetime.now()
    print(now.strftime('%Y-%m-%d %H:%M:%S'))
    c = CurrencyRates()
    currencyData = c.get_rates('USD')
    df = pd.DataFrame.from_dict(currencyData, orient='index')
    df.columns = ['ExRate']
    df.to_csv('ExchangeRates.csv', index_label='Currency')
    print('Currency csv created')


<mask token>

<mask token>


def main():
    now = datetime.now()
    print(now.strftime('%Y-%m-%d %H:%M:%S'))
    c = CurrencyRates()
    currencyData = c.get_rates('USD')
    df = pd.DataFrame.from_dict(currencyData, orient='index')
    df.columns = ['ExRate']
    df.to_csv('ExchangeRates.csv', index_label='Currency')
    print('Currency csv created')


main()

import json
import sys
import csv
import pandas as pd
from forex_python.converter import CurrencyRates
from datetime import datetime


def main():
    now = datetime.now()
    print(now.strftime('%Y-%m-%d %H:%M:%S'))
    c = CurrencyRates()
    currencyData = c.get_rates('USD')
    df = pd.DataFrame.from_dict(currencyData, orient='index')
    df.columns = ['ExRate']
    df.to_csv('ExchangeRates.csv', index_label='Currency')
    print('Currency csv created')


main()

import json
import sys
import csv
import pandas as pd
from forex_python.converter import CurrencyRates
from datetime import datetime


def main():
  now= datetime.now()
  print(now.strftime('%Y-%m-%d %H:%M:%S'))

  c = CurrencyRates()
  currencyData = c.get_rates('USD')
  df = pd.DataFrame.from_dict(currencyData, orient='index')
  df.columns = ['ExRate']
  df.to_csv('ExchangeRates.csv', index_label='Currency')

  print("Currency csv created")

main()
