Skip to content

Commit

Permalink
chrome driver 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sadovsd committed Apr 16, 2024
1 parent 35f9d10 commit 1b55252
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/load_transform_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_new_ethereum_ohlc():
time.sleep(5) # Wait for the download to complete

# Locate the downloaded file
list_of_files = glob.glob(str(download_dir / '*.csv'))
list_of_files = glob.glob(os.path.join(NEW_OHLC, '*.csv')) # * means all if need specific format then *.csv
latest_file = max(list_of_files, key=os.path.getctime)

# Load the data into a DataFrame
Expand All @@ -51,7 +51,7 @@ def get_new_ethereum_ohlc():
end_date = df['Date'].iloc[0].replace('/', '')

# Rename the file
new_filename = download_dir / f"ethereum_{start_date}_{end_date}.csv"
new_filename = os.path.join(NEW_OHLC, f"ethereum_{start_date}_{end_date}.csv")
os.rename(latest_file, new_filename)

return df
Expand Down

0 comments on commit 1b55252

Please sign in to comment.