Skip to content

Commit

Permalink
fix bug that was trashing "Close" values
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielGoldfarb committed Nov 1, 2022
1 parent 2ea49e4 commit d63f27f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mplfinance/_arg_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ def _check_and_prepare_data(data, config):
expect_cols = columns
else:
expect_cols = cols

for c in expect_cols:
if c not in data.columns:
for col in expect_cols:
if col not in data.columns:
for dc in data.columns:
if dc.strip() != dc:
warnings.warn('\n ================================================================= '+
'\n Input DataFrame column name "'+dc+'" '+
'\n contains leading and/or trailing whitespace.',category=UserWarning)
raise ValueError('Column "'+c+'" NOT FOUND in Input DataFrame!'+
raise ValueError('Column "'+col+'" NOT FOUND in Input DataFrame!'+
'\n CHECK that your column names are correct AND/OR'+
'\n CHECK for leading or trailing blanks in your column names.')

Expand Down

0 comments on commit d63f27f

Please sign in to comment.