4

Given http://dask.readthedocs.io/en/latest/dataframe-api.html#dask.dataframe.DataFrame.reset_index says dask doesn't support drop=True for reset_index() how do I join 2 dataframes together with different index (as viewed by head())

mobcdi
  • 1,532
  • 2
  • 28
  • 49
  • Are you familiar with the `left_on=` and `right_on=` keyword arguments to `pd.merge`? – MRocklin Aug 28 '16 at 02:54
  • I wasn't but would that work if the keys were different in both data frame? – mobcdi Aug 28 '16 at 06:19
  • You may find the Pandas documentation useful: http://pandas.pydata.org/pandas-docs/stable/merging.html#database-style-dataframe-joining-merging – MRocklin Aug 28 '16 at 12:01

1 Answers1

0

While my dask dataframe was small I was able to create a pandas dataframe from it, reset the index by dropping it

npdf = ddSample.compute()
npdf.reset_index(drop=True, inplace=True)
npdf.head()

after that I was able to use

ddmerged= dd.merge(npdf,df2) 
mobcdi
  • 1,532
  • 2
  • 28
  • 49