I have a large file that I'm trying to reduce using dataframe.drop Here's my code:
probe_df = pd.read_csv(csv_file,header = 9233, nrows = 4608)
# Get rid of stuff
c_to_drop = 'Unnamed: ' + str(count_tp+1)
probe_df = probe_df.set_index("Chamber ID").drop(c_to_drop,1)
When I ran this, I got this error message:
probe_df = probe_df.set_index("Chamber ID").drop(c_to_drop,1)
TypeError: DataFrame.drop() takes from 1 to 2 positional arguments but 3 were given
I don't understand why I got the error and how to fix it. Please help!
I'm a newbie and I tried looking online for a solution but I'm still quite new and didn't see anything that matched my issue exactly.