I'm new to Dask and the manner in which columns are dropped is confusing to me. I've read a csv file into the Dask dataframe. Then suppose I have this:
print(len(columns_to_drop)) # There are 66
print(len(list(df.columns))) # The Dask columns before the drop
df.drop(columns_to_drop, axis=1).compute(). # Drop the columns
pd_df = df.compute() # Create a Pandas dataframe
print(pd_df.shape[1]) # Pandas dataframe columns
print(len(list(df.columns))) # The Dask columns after the drop
What I get from the print statements:
- 66 columns to drop
- 207 Dask df columns before the drop
- 207 Pandas column count
- 207 Dask column after the drop