Olivier Girardot created SPARK-7247:
---------------------------------------

             Summary: Add Pandas' shift method to the Dataframe API
                 Key: SPARK-7247
                 URL: https://issues.apache.org/jira/browse/SPARK-7247
             Project: Spark
          Issue Type: Wish
          Components: SQL
    Affects Versions: 1.3.1
            Reporter: Olivier Girardot
            Priority: Minor


Spark's DataFrame provide several of the capabilities of Pandas and R Dataframe 
but in a distributed fashion which makes it almost easy to rewrite Pandas code 
to Spark.

Almost, but there is a feature that's difficult to workaround right now, that's 
the shift method : 
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.shift.html

I'm working with some data scientists that are using this feature a lot in 
order to check for "rows equality" after a sort by some keys. Example (in 
pandas) :

{code}
df['delta'] = (df.START_DATE.shift(-1) - df.END_DATE).astype('timedelta64[D]')
{code}

I think this would be troublesome to add, I don't even know if this change 
would be do-able. But as a user, it would be useful for me.

Olivier.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to