Stacey
Stacey

Reputation: 5097

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?

Upvotes: 1

Views: 3930

Answers (1)

ℕʘʘḆḽḘ
ℕʘʘḆḽḘ

Reputation: 19375

if you want to free some space

import gc

del adios_df
gc.collect()

Upvotes: 1

Related Questions