-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-1462359/SNOW-1462481: Add Series.str and Series.dt to docs #1784
Conversation
@@ -117,9 +117,6 @@ the method in the left column. | |||
+-----------------------------+---------------------------------+----------------------------------------------------+ | |||
| ``slice_replace`` | N | | | |||
+-----------------------------+---------------------------------+----------------------------------------------------+ | |||
| ``replace`` | P | ``N`` if `pat` is non-string, `repl` is | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entry was redundant (it appears also on line 101, in the correct alphabetical location).
@@ -38,7 +38,7 @@ def split(): | |||
|
|||
Returns | |||
------- | |||
Series, Index, DataFrame or MultiIndex | |||
:class:`~snowflake.snowpark.modin.pandas.Series`, Index, :class:`~snowflake.snowpark.modin.pandas.DataFrame` or MultiIndex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a warning about DataFrame
being ambiguous.
FYI @sfc-gh-vbudati we may be able to stop replacing "snowflake.snowpark.pandas" in jinja templates moving forward. Setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! Thanks for figuring this out, Jonathan!
1695e8c
to
12e1def
Compare
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1462359 and SNOW-1462481
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
This PR adds documentation for Series.str.* and Series.dt.* to Snowpark pandas. This is significant for two reasons:
Series.str
/dt
name rather than their respective accessor objects.The changes here are based loosely off those made by native pandas for the same purpose: https://github.com/pandas-dev/pandas/blob/bbe0e531383358b44e94131482e122bda43b33d7/doc/source/conf.py#L484-L485
I could not get the changes of upstream pandas to work directly out of the box, though I am not entirely sure as to why. It could be a consequence of these classes being external to Snowpark, or just the fact that vanilla pandas has an
Accessor
class wrapping theSeries.str
andSeries.dt
properties that modin lacks.See comments in
docs/source/conf.py
for a detailed explanation of what each class does.