May-09-2022, 08:57 PM
This returns the drop function. It does nothing to modify df.
https://pandas.pydata.org/pandas-docs/st....drop.html
# DROP TEMP COLUMN BEFORE WRITING CSV df['DT'].dropTo drop 'DT' from df you can do either of these:
df = df.drop('DT') # or df.drop('DT', inplace=True)Try reading the documentation. I mean really reading until you understand what it says. For me that usually takes 4-5 times through the first time I try something new.
https://pandas.pydata.org/pandas-docs/st....drop.html