pandas .drop(columns=[]) is returning KeyError when columns are in the csv and dataframe
pandas .drop(columns=[]) is returning KeyError when columns are in the csv and dataframe Question: I’m trying to import market data from a csv to run some backtests. I wrote the following code: import pandas as pd import numpy as np df = pd.read_csv("30mindata.csv") df = df.drop(columns=[‘Volume’, ‘NumberOfTrades’, ‘BidVolume’, ‘AskVolume’]) print(df) I’m getting the error: KeyError: …