[ 
https://issues.apache.org/jira/browse/BEAM-9547?focusedWorklogId=554537&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-554537
 ]

ASF GitHub Bot logged work on BEAM-9547:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Feb/21 00:52
            Start Date: 19/Feb/21 00:52
    Worklog Time Spent: 10m 
      Work Description: robertwb commented on a change in pull request #13932:
URL: https://github.com/apache/beam/pull/13932#discussion_r578848101



##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -95,7 +138,13 @@ def fillna(self, value, method, axis, **kwargs):
   def ffill(self, **kwargs):
     return self.fillna(method='ffill', **kwargs)
 
+  @frame_base.args_to_kwargs(pd.DataFrame)
+  @frame_base.populate_defaults(pd.DataFrame)
+  def bfill(self, **kwargs):
+    return self.fillna(method='bfill', **kwargs)

Review comment:
       This method is order sensitive, right? 

##########
File path: sdks/python/apache_beam/dataframe/frames.py
##########
@@ -239,6 +288,36 @@ def __getitem__(self, key):
       # be more surprising than a clear error.
       raise frame_base.WontImplementError('non-deferred')
 
+  def keys(self):
+    return self.index
+
+  @frame_base.args_to_kwargs(pd.Series)
+  @frame_base.populate_defaults(pd.Series)
+  def append(self, to_append, ignore_index, verify_integrity, **kwargs):
+    if not isinstance(to_append, DeferredSeries):
+      raise frame_base.WontImplementError(
+          "append() only accepts DeferredSeries instances, received " +
+          str(type(to_append)))
+    if ignore_index:
+      raise frame_base.WontImplementError(
+          "append(ignore_index=True) is order sensitive")
+
+    if verify_integrity:
+      # verifying output has a unique index requires global index.
+      requires = partitionings.Singleton()

Review comment:
       Just a thought: it might be nice to attach a message as to why we chose 
Singleton here (that we could use when throwing an error). Fine with a 
TODO/JIRA. 

##########
File path: sdks/python/apache_beam/dataframe/frames_test.py
##########
@@ -405,6 +440,19 @@ def test_series_agg(self):
       self._run_test(lambda s: s.agg(['mean']), s)
       self._run_test(lambda s: s.agg('mean'), s)
 
+  def test_append_sort(self):
+    df1 = pd.DataFrame({'int': [1, 2, 3], 'str': ['a', 'b', 'c']},

Review comment:
       You can tag a line with `# yapf: disable`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 554537)
    Time Spent: 42h  (was: 41h 50m)

> Implement all pandas operations (or raise WontImplementError)
> -------------------------------------------------------------
>
>                 Key: BEAM-9547
>                 URL: https://issues.apache.org/jira/browse/BEAM-9547
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Brian Hulette
>            Assignee: Robert Bradshaw
>            Priority: P2
>              Labels: dataframe-api
>          Time Spent: 42h
>  Remaining Estimate: 0h
>
> We should have an implementation for every DataFrame, Series, and GroupBy 
> method. Everything that's not possible to implement should get a default 
> implementation that raises WontImplementError
> SeeĀ https://github.com/apache/beam/pull/10757#discussion_r389132292
> Progress at the individual operation level is tracked in a 
> [spreadsheet|https://docs.google.com/spreadsheets/d/1hHAaJ0n0k2tw465ORs5tfdy4Lg0DnGWIQ53cLjAhel0/edit],
>  consider requesting edit access if you'd like to help out.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to