[image] CJC-ds: import dask.dataframe as dd ddf = dd.from_pandas(df) ddf.groupby('a_cat')['b_num'].ffill() Hi @scharlottej13 thank you! I just made the feature request at the github repo :smiley: Answer from CJC-ds on dask.discourse.group
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.Series.groupby.html
pandas.Series.groupby — pandas 3.0.2 documentation
pandas.api.typing.SeriesGroupBy · Returns a groupby object that contains information about the groups. See also · resample · Convenience method for frequency conversion and resampling of time series. Notes · See the user guide for more detailed usage and examples, including splitting an ...
🌐
GitHub
github.com › dask › dask › issues › 4307
SeriesGroupBy Object has not Attribute Diff · Issue #4307 · dask/dask
December 17, 2018 - I have a multi-index DaskDataframe and am unable to compute a simple diff after a groupby operation on the dataframe. df.groupby('IndexName')['ColName'].diff() ..'SeriesGroupBy' object has no attribute 'diff The Dask Series object has a ...
Author   bgoodman44
🌐
Ds100
ds100.org › fa18 › assets › lectures › lec03 › 03-groupby-and-pivot-basics.html
03-groupby-and-pivot-basics - Data 100
Challenge: Try to figure out how to generate a table like the one above, except that each entry should represent all attributes of the candidate who got the maximum vote in that category. For example, the Republican Win category should feature Reagan in 1984 with 58.8% of the vote. The answer is a few cells below this one. There's a hint a few cells down. Hint: Consider using sort_values and first somehow. ... As described above, both SeriesGroupBy and DataFrameGroupBy objects have lots of handy methods for computing aggregate values for groups, e.g.
🌐
Pandas
pandas.pydata.org › pandas-docs › stable › reference › groupby.html
GroupBy — pandas 3.0.2 documentation
pandas.api.typing.DataFrameGroupBy and pandas.api.typing.SeriesGroupBy instances are returned by groupby calls pandas.DataFrame.groupby() and pandas.Series.groupby() respectively · DataFrameGroupBy.__iter__()
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.core.groupby.SeriesGroupBy.aggregate.html
pandas.core.groupby.SeriesGroupBy.aggregate — pandas 2.3.3 documentation
Aggregate using one or more operations over the specified axis · Function to use for aggregating the data. If a function, must either work when passed a Series or when passed to Series.apply
🌐
Pandas
pandas.pydata.org › pandas-docs › stable › reference › api › pandas.Series.groupby.html
pandas.Series.groupby — pandas 3.0.1 documentation
pandas.api.typing.SeriesGroupBy · Returns a groupby object that contains information about the groups. See also · resample · Convenience method for frequency conversion and resampling of time series. Notes · See the user guide for more detailed usage and examples, including splitting an ...
Find elsewhere
🌐
Dask
docs.dask.org › en › latest › generated › dask.dataframe.groupby.SeriesGroupBy.apply.html
dask.dataframe.groupby.SeriesGroupBy.apply — Dask documentation
SeriesGroupBy.apply(func, *args, **kwargs)¶ · Parallel version of pandas GroupBy.apply · This mimics the pandas version except for the following: If the grouper does not align with the index then this causes a full shuffle. The order of rows within each group may not be preserved.
🌐
Google Cloud
cloud.google.com › python › client libraries
Class SeriesGroupBy (2.14.0) | Python client library
The documentation has moved! Please head over to the new doc site at dataframes.bigquery.dev · Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License.
🌐
Pandas
pandas.pydata.org › docs › reference › groupby.html
GroupBy — pandas 3.0.2 documentation - PyData |
pandas.api.typing.DataFrameGroupBy and pandas.api.typing.SeriesGroupBy instances are returned by groupby calls pandas.DataFrame.groupby() and pandas.Series.groupby() respectively · DataFrameGroupBy.__iter__()
🌐
GitHub
github.com › dask › dask › issues › 3438
Dataframe groupby()[column].agg fails with AttributeError · Issue #3438 · dask/dask
April 24, 2018 - AttributeError Traceback (most recent call last) <ipython-input-1-b43466d1ae6a> in <module>() 6 -0.666]}) 7 ddf = dd.from_pandas(df, npartitions=1) ----> 8 ddf.groupby('A')['B'].agg('var') 9 10 ~/applications/anaconda3/lib/python3.6/site-packages/dask/dataframe/groupby.py in agg(self, arg, split_every, split_out) 1217 @derived_from(pd.core.groupby.SeriesGroupBy) 1218 def agg(self, arg, split_every=None, split_out=1): -> 1219 return self.aggregate(arg, split_every=split_every, split_out=split_out) ~/applications/anaconda3/lib/python3.6/site-packages/dask/dataframe/groupby.py in aggregate(self, arg, split_every, split_out) 1211 1212 if not isinstance(arg, (list, dict)): -> 1213 result = result[result.columns[0]] 1214 1215 return result AttributeError: 'Series' object has no attribute 'columns' No one assigned ·
Author   joergdietrich
🌐
GitHub
github.com › pandas-dev › pandas › issues › 32293
ENH: implement SeriesGroupBy.corrwith · Issue #32293 · pandas-dev/pandas
February 27, 2020 - >>> df.groupby('key') <pandas.core.groupby.generic.DataFrameGroupBy object at 0x000001C0D32FC400> # DataFrameGroupBy.corrwith has no issues >>> df.groupby('key').corrwith(pd.Series([1,2,3,1,2,3])) value key a 1.0 b -1.0 >>> df.groupby('key')['value'] <pandas.core.groupby.generic.SeriesGroupBy object at 0x000001C0D279BF28> # SeriesGroupBy.corrwith is not implemented >>> df.groupby('key')['value'].corrwith(pd.Series([1, 2, 3, 1, 2, 3])) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\users\xxx\xxx\pandas\pandas\core\groupby\groupby.py", line 580, in __getattr__ f"'{type(self).__name__}' object has no attribute '{attr}'" AttributeError: 'SeriesGroupBy' object has no attribute 'corrwith' As shown above, DataFrameGroupBy.corrwith has no issues and works as expected.
Author   fujiaxiang
🌐
Google Groups
groups.google.com › g › pydata › c › 4ZjOP0Lfjdc
Problem with groupby and nth in pandas 0.18.1
July 5, 2016 - I noticed that you can also have the original behaviour of 0.17 by passing as_index=False: In [13]: df.groupby('device', as_index=False)['timestamp'].nth(0) Out[13]: 0 0 3 1 Name: timestamp, dtype: int64 Are you sure the transform('idxmin') works? I get an error when I try that (both on 0.17.1 as 0.18.1): AttributeError: 'SeriesGroupBy' object has no attribute 'idxmim'
🌐
GitHub
github.com › pandas-dev › pandas › issues › 5102
BUG: in .groupby.SeriesGroupBy plot not accessible? · Issue #5102 · pandas-dev/pandas
October 3, 2013 - --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-63-3760a47a721b> in <module>() ----> 1 grp.kWh.plot() /pandas/pandas/core/groupby.pyc in __getattr__(self, attr) 250 251 if hasattr(self.obj, attr) and attr != '_cache': --> 252 return self._make_wrapper(attr) 253 254 raise AttributeError("%r object has no attribute %r" % /pandas/pandas/core/groupby.pyc in _make_wrapper(self, name) 265 "using the 'apply' method".format(kind, name, 266 type(self).__name__)) --> 267 raise AttributeError(msg) 268 269 f = getattr(self.obj, name) AttributeError: Cannot access callable attribute 'plot' of 'SeriesGroupBy' objects, try using the 'apply' method ·
Author   nehalecky