Skip to content

Commit

Permalink
Merge pull request #2572 from szarnyasg/iss2571
Browse files Browse the repository at this point in the history
Relational API on Pandas: Add missing where clause
  • Loading branch information
szarnyasg committed Mar 24, 2024
2 parents 998f2a8 + 4524a6c commit 0bbff14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guides/python/relational_api_pandas.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ input_df = pandas.DataFrame.from_dict({'i': [1, 2, 3, 4],
rel = con.from_df(input_df)

# chain together relational operators (this is a lazy operation, so the operations are not yet executed)
# equivalent to: SELECT i, j, i*2 AS two_i FROM input_df ORDER BY i DESC LIMIT 2
# equivalent to: SELECT i, j, i*2 AS two_i FROM input_df WHERE i >= 2 ORDER BY i DESC LIMIT 2
transformed_rel = rel.filter('i >= 2').project('i, j, i*2 as two_i').order('i desc').limit(2)

# trigger execution by requesting .df() of the relation
Expand Down

0 comments on commit 0bbff14

Please sign in to comment.