Skip to content

feat: limited support of lamdas in Series.apply #345

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

Merged
merged 18 commits into from
Feb 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
264becb
feat: limited support of lamdas in `Series.apply`
shobsi Jan 24, 2024
f98940b
Merge remote-tracking branch 'refs/remotes/github/main' into shobs-al…
shobsi Jan 25, 2024
266a3ea
add code sample for non-remote-function `Series.apply`
shobsi Jan 25, 2024
d3f9878
remove ..note in the middle of code samples due to rendering issue
shobsi Jan 25, 2024
af8651a
Merge remote-tracking branch 'refs/remotes/github/main' into shobs-al…
shobsi Jan 25, 2024
89b8dd1
fix typo
shobsi Jan 25, 2024
44b1689
Merge remote-tracking branch 'refs/remotes/github/main' into shobs-al…
shobsi Jan 25, 2024
4ed8f7b
add lambda test coverage and code samples for `Series.mask`
shobsi Jan 26, 2024
6b0dae7
Merge remote-tracking branch 'refs/remotes/github/main' into shobs-al…
shobsi Jan 31, 2024
2603ba1
apply the non-remote function on series level
shobsi Jan 31, 2024
1b93bc2
Merge remote-tracking branch 'refs/remotes/github/main' into shobs-al…
shobsi Feb 6, 2024
1e1551e
Merge remote-tracking branch 'refs/remotes/github/main' into shobs-al…
shobsi Feb 8, 2024
e782877
add suggestion to use remote function if direct func errors out
shobsi Feb 9, 2024
ac200ca
Merge remote-tracking branch 'refs/remotes/github/main' into shobs-al…
shobsi Feb 9, 2024
4357d4f
support by_row param in Series.apply
shobsi Feb 9, 2024
3b51709
raise ValueError instead of AssertionError
shobsi Feb 9, 2024
33d8b8b
fix Series.mask tests
shobsi Feb 10, 2024
6da45f0
Merge branch 'main' into shobs-allow-lambdas
shobsi Feb 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove ..note in the middle of code samples due to rendering issue
  • Loading branch information
shobsi committed Jan 25, 2024
commit d3f9878076fccc901e550e8a5e69c335f79de42a
13 changes: 3 additions & 10 deletions third_party/bigframes_vendored/pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1154,16 +1154,9 @@ def apply(

There is a limited support of simple functions and lambdas which can be
operated directly (without converting into a `remote_function`) on the
BigQuery DataFrames objects.

.. note::
Bigframes does not yet support ``dict`` subclasses that define
``__missing__`` (i.e. provide a method for default values). These
are treated the same as ``dict``.

This approach takes advantage of a nuance in the way BigQuery DataFrames
objects are modelled internally and works only if the function body
contains only arithmatic or logical operators.
BigQuery DataFrames objects. This approach takes advantage of a nuance
in the way BigQuery DataFrames objects are modeled internally and works
only if the function body contains only arithmatic or logical operators.

>>> nums = bpd.Series([1, 2, 3, 4])
>>> nums
Expand Down