I have a dask dataframe with an index on one of the columns. The issue is if I do a df.head() it always treturns an empty df, whereas df.tail always returns the correct df. I checked df.head always checks for the first n entries in the first partition. So if i do df.reset_index(), it should work but thats not the case
Below is the code to reproduce this:
import dask.dataframe as dd
import pandas as pd
data = pd.DataFrame({
'i64': np.arange(1000, dtype=np.int64),
'Ii32': np.arange(1000, dtype=np.int32),
'bhello': np.random.choice(['hello', 'Yo', 'people'], size=1000).astype("O")
})
daskDf = dd.from_pandas(data, chunksize=3)
daskDf = daskDf.set_index('bhello')
print(daskDf.head())