Skip to content

Commit 72313ea

Browse files
Apply suggestions from code review
Co-authored-by: Adam R. Jensen <[email protected]>
1 parent f462d86 commit 72313ea

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

docs/sphinx/source/whatsnew/v0.12.1.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Enhancements
2424
:py:func:`~pvlib.iotools.get_nsrdb_psm4_tmy`,
2525
:py:func:`~pvlib.iotools.get_nsrdb_psm4_conus`,
2626
:py:func:`~pvlib.iotools.get_nsrdb_psm4_full_disc`, and
27-
:py:func:`~pvlib.iotools.read_nsrdb_psm4`. (:issue:`2326`, :pull:`2378`)
27+
:py:func:`~pvlib.iotools.read_nsrdb_psm4`. (:issue:`2326`, :pull:`2378`,
28+
:pull:`2445`)
2829

2930
Documentation
3031
~~~~~~~~~~~~~

pvlib/iotools/psm4.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -745,10 +745,10 @@ def read_nsrdb_psm4(filename, map_variables=True):
745745
# Since the header has so many columns, excel saves blank cols in the
746746
# data below the header lines.
747747
columns = [col for col in columns if col != '']
748-
dtypes = dict.fromkeys(columns, float) # all floats except datevec
749-
dtypes.update(Year=int, Month=int, Day=int, Hour=int, Minute=int)
750-
dtypes['Cloud Type'] = int
751-
dtypes['Fill Flag'] = int
748+
dtypes = dict.fromkeys(columns, float)
749+
dtypes.update({'Year': int, 'Month': int, 'Day': int, 'Hour': int,
750+
'Minute': int, 'Cloud Type': int, 'Fill Flag': int})
751+
752752
data = pd.read_csv(
753753
fbuf, header=None, names=columns, usecols=columns, dtype=dtypes,
754754
delimiter=',', lineterminator='\n') # skip carriage returns \r

0 commit comments

Comments
 (0)