Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change of parameter in order to handle the newer version of pandas #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/lib/wwo_hist/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def retrieve_this_location(api_key, location, start_date, end_date, frequency, r
start_time = datetime.now()

# create list of first day of month for range between start and end dates non-inclusive (open)
list_mon_begin = pd.date_range(start_date, end_date, freq='MS', closed='right')
list_mon_begin = pd.date_range(start_date, end_date, freq='MS', inclusive='right')
# convert to Series and add start_date at beginning
list_mon_begin = pd.concat([pd.Series(pd.to_datetime(start_date)), pd.Series(list_mon_begin)], ignore_index=True)

# create list of month end dates for range between start and end dates non-inclusive (open)
list_mon_end = pd.date_range(start_date, end_date, freq='M', closed='left')
list_mon_end = pd.date_range(start_date, end_date, freq='M', inclusive='left')
# convert to Series and add end_date at end
list_mon_end = pd.concat([pd.Series(list_mon_end), pd.Series(pd.to_datetime(end_date))], ignore_index=True)

Expand Down
4 changes: 2 additions & 2 deletions wwo_hist/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def retrieve_this_location(api_key, location, start_date, end_date, frequency, r
start_time = datetime.now()

# create list of first day of month for range between start and end dates non-inclusive (open)
list_mon_begin = pd.date_range(start_date, end_date, freq='MS', closed='right')
list_mon_begin = pd.date_range(start_date, end_date, freq='MS', inclusive='right')
# convert to Series and add start_date at beginning
list_mon_begin = pd.concat([pd.Series(pd.to_datetime(start_date)), pd.Series(list_mon_begin)], ignore_index=True)

# create list of month end dates for range between start and end dates non-inclusive (open)
list_mon_end = pd.date_range(start_date, end_date, freq='M', closed='left')
list_mon_end = pd.date_range(start_date, end_date, freq='M', inclusive='left')
# convert to Series and add end_date at end
list_mon_end = pd.concat([pd.Series(list_mon_end), pd.Series(pd.to_datetime(end_date))], ignore_index=True)

Expand Down