Skip to content

Commit ffd8f35

Browse files
KonstantinTrwholmgren
authored andcommitted
remove unused tmy._recolumn 'inplace' kwarg
remove unused tmy._recolumn 'inplace' kwarg
1 parent 8e1fe41 commit ffd8f35

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Bug fixes
2121
* ModelChain.prepare_inputs and ModelChain.complete_irradiance now
2222
correctly pass the 'solar_position_method' argument to
2323
solarposition.get_solarposition (:issue:`377`)
24+
* Fixed usage of inplace parameter for tmy._recolumn (:issue:`342`)
2425

2526
Enhancements
2627
~~~~~~~~~~~~

pvlib/tmy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def readtmy3(filename=None, coerce_year=None, recolumn=True):
187187
index_col='datetime')
188188

189189
if recolumn:
190-
_recolumn(data) # rename to standard column names
190+
data = _recolumn(data) # rename to standard column names
191191

192192
data = data.tz_localize(int(meta['TZ']*3600))
193193

@@ -213,7 +213,7 @@ def _parsedate(ymd, hour, year=None):
213213
return true_date
214214

215215

216-
def _recolumn(tmy3_dataframe, inplace=True):
216+
def _recolumn(tmy3_dataframe):
217217
"""
218218
Rename the columns of the TMY3 DataFrame.
219219
@@ -251,7 +251,7 @@ def _recolumn(tmy3_dataframe, inplace=True):
251251

252252
mapping = dict(zip(raw_columns.split(','), new_columns))
253253

254-
return tmy3_dataframe.rename(columns=mapping, inplace=True)
254+
return tmy3_dataframe.rename(columns=mapping)
255255

256256

257257
def readtmy2(filename):

0 commit comments

Comments
 (0)