Skip to content

Commit

Permalink
Merge pull request #7361 from meeseeksmachine/auto-backport-of-pr-735…
Browse files Browse the repository at this point in the history
…0-on-5.1

Backport PR #7350 on branch 5.1 (The 'delim_whitespace' keyword in pd.read_csv is deprecated)
  • Loading branch information
nabobalis committed Jan 4, 2024
2 parents 596e4c9 + b21cc5e commit 68dea9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelog/7350.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The ``delim_whitespace`` keyword in `pandas.read_csv` is deprecated and was updated with ``sep='\s+'``.
This should have no affect on the output of the code.
3 changes: 1 addition & 2 deletions sunpy/timeseries/sources/eve.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,7 @@ def _parse_level_0cs(filepath):
month = int(date_parts[2])
day = int(date_parts[3])

data = read_csv(filepath, delim_whitespace=True, names=fields, comment=';',
dtype={'HHMM': int})
data = read_csv(filepath, sep=r'\s+', names=fields, comment=';', dtype={'HHMM': int})
# First line is YYYY DOY MM DD
data = data.iloc[1:, :]
data['Hour'] = data['HHMM'] // 100
Expand Down

0 comments on commit 68dea9e

Please sign in to comment.