You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [1]: importdaskIn [2]: importdask_exprasdd
...: df=dd.datasets.timeseries()
In [3]: df.head()
Out[3]:
nameidxytimestamp2000-01-0100:00:00Michael10060.927520-0.4428592000-01-0100:00:01Kevin1018-0.411144-0.0376672000-01-0100:00:02Yvonne974-0.648850-0.5157542000-01-0100:00:03Yvonne9940.4631030.5609372000-01-0100:00:04Yvonne1002-0.511311-0.308211In [4]: df.merge(df.name.head())
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-254398e6f615> in ?()
----> 1 df.merge(df.name.head())
~/workspace/dask-expr/dask_expr/_collection.py in ?(self, right, how, on, left_on, right_on, left_index, right_index, suffixes, indicator, shuffle_method, npartitions, broadcast)
2572 an internal ``shuffle``, because shuffling places all rows that have the same
2573 index in the same partition. To avoid this error, make sure all rows with the
2574 same ``on``-column value can fit on a single partition.
2575 """
-> 2576 return merge(
2577 self,
2578 right,
2579 how,
~/workspace/dask-expr/dask_expr/_collection.py in ?(left, right, how, on, left_on, right_on, left_index, right_index, suffixes, indicator, shuffle_method, npartitions, broadcast)
4779 for o in [on, left_on, right_on]:
4780 if isinstance(o, FrameBase):
4781 raise NotImplementedError()
4782 if not on and not left_on and not right_on and not left_index and not right_index:
-> 4783 on = [c for c in left.columns if c in right.columns]
4784 if not on:
4785 left_index = right_index = True
4786
~/workspace/dask-expr/dask_expr/_collection.py in ?(.0)
-> 4783 def merge(
4784 left,
4785 right,
4786 how="inner",
~/mambaforge/envs/etl-tpch/lib/python3.11/site-packages/pandas/core/generic.py in ?(self, name)
6289 and name not in self._accessors
6290 and self._info_axis._can_hold_identifiers_and_holds_name(name)
6291 ):
6292 return self[name]
-> 6293 return object.__getattribute__(self, name)
AttributeError: 'Series' object has no attribute 'columns'
In [5]: df.head().merge(df.name.head())
Out[5]:
nameidxy0Michael10060.927520-0.4428591Kevin1018-0.411144-0.0376672Yvonne974-0.648850-0.5157543Yvonne974-0.648850-0.5157544Yvonne974-0.648850-0.5157545Yvonne9940.4631030.5609376Yvonne9940.4631030.5609377Yvonne9940.4631030.5609378Yvonne1002-0.511311-0.3082119Yvonne1002-0.511311-0.30821110Yvonne1002-0.511311-0.308211
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: