-
Notifications
You must be signed in to change notification settings - Fork 148
SNOW-1897976: adding pipe method to DataFrame #4178
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
fc030b3
0ca8ba8
6e887cd
a0be013
0616463
401fadc
523c988
8827f3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -409,6 +409,24 @@ def test_dataFrame_printSchema(capfd, mock_server_connection): | |
| ) | ||
|
|
||
|
|
||
| def test_dataFrame_pipe(mock_server_connection): | ||
|
Tijoxa marked this conversation as resolved.
Outdated
|
||
| session = snowflake.snowpark.session.Session(mock_server_connection) | ||
| df = session.create_dataframe([[1, ""], [3, None]]) | ||
| df._plan._metadata = PlanMetadata( | ||
| attributes=[ | ||
| Attribute("A", IntegerType(), False), | ||
| Attribute("B", StringType()), | ||
| ], | ||
| quoted_identifiers=None, | ||
| ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like you copied this example from Also, please modify
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the new commits, I've updated the tests and tried to put the test at the correct place. However, I don't know if I should put it under |
||
|
|
||
| def test_func(df): | ||
| return df | ||
|
|
||
| result_df, expected_result = df.pipe(test_func), test_func(df) | ||
| assert result_df == expected_result | ||
|
|
||
|
|
||
| def test_session(): | ||
| fake_session = mock.create_autospec(Session, _session_id=123456) | ||
| fake_session._analyzer = mock.Mock() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.