简体   繁体   中英

Remove or empty all data from a pandas dataframe

I have a dataframe (df) which I would like to recycle. It's full of data and I would like to remove everything from this dataframe. Would df.drop() work?

if you want to free some space

import gc

del adios_df
gc.collect()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM