Skip to content

Commit

Permalink
style: adapt code to prevent pandas deprecated warning
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPic committed Feb 20, 2024
1 parent 7e6c5ce commit f25a58e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ehyd_tools/in_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,9 @@ def read_ehyd_file(filepath_or_buffer, series_label='data'):
# ___________________________
ts = pd.read_csv(io.StringIO('\n'.join(data).replace(' ', '')), sep=';', decimal=',', index_col=0,
na_values='Lücke', header=None, # names=[series_label],
date_parser=lambda s: pd.to_datetime(s, format='%d.%m.%Y%H:%M:%S')
# date_parser=lambda s: pd.to_datetime(s, format='%d.%m.%Y%H:%M:%S')
)
ts.index = pd.to_datetime(ts.index, format='%d.%m.%Y%H:%M:%S')

if isinstance(ts, pd.DataFrame):
ts = ts.dropna(axis=1, how='all')
Expand Down

0 comments on commit f25a58e

Please sign in to comment.