series object has no attribute columns 1

series object has no attribute columns

df = dd.read_parquet('/data/dask/af.pq',columns=['timestamp','gid','uid'])
df.groupby('gid').apply(lambda x:x.resample('1D').uid.unique(),meta=('uid','object'))

Here is what the above code is Doing:
1. Read the parquet file
2. Set the index to timestamp
3. Group by gid
4. Apply a function to each group
5. Resample the data to 1 day
6. Get the unique uids
7. Set the meta data for the result

The result is a dask dataframe with the following columns:
gid, uid

The uid column is a list of unique uids for each gid for each day.

Similar Posts