Skip to content

Commit

Permalink
use df.drop_duplicates() to delete duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
catdance124 committed Sep 15, 2019
1 parent f7341ce commit ee61299
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def serve_layout():
),
dcc.Interval(
id='interval-component',
interval=60*1000, # in milliseconds
interval=600*1000, # in milliseconds
n_intervals=0
),
html.Div(['© 2019 ', dcc.Link('kinosi', href='https://github.com/catdance124')],
Expand Down
1 change: 1 addition & 0 deletions get_weather_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def get_24h_data(data_type='precip'):
prev_time = prev_time + timedelta(minutes=30)
df_24h['Date'] = pd.to_datetime(df_24h['Date'])
df_24h.sort_values(by='Date')
df_24h = df_24h.drop_duplicates()
df_24h.reset_index(inplace=True, drop=True)
df_24h.to_pickle(f'./data/24h_{data_type}.pkl')

Expand Down

0 comments on commit ee61299

Please sign in to comment.