@@ -1241,12 +1241,22 @@ def read_gbq_function(
12411241
12421242 **Examples:**
12431243
1244- Use the ``cw_lower_case_ascii_only`` function from Community UDFs.
1245- (https://github.com/GoogleCloudPlatform/bigquery-utils/blob/master/udfs/community/cw_lower_case_ascii_only.sqlx)
1246-
12471244 >>> import bigframes.pandas as bpd
12481245 >>> bpd.options.display.progress_bar = None
12491246
1247+ Use the [cw_lower_case_ascii_only](https://github.com/GoogleCloudPlatform/bigquery-utils/blob/master/udfs/community/README.md#cw_lower_case_ascii_onlystr-string)
1248+ function from Community UDFs.
1249+
1250+ >>> func = bpd.read_gbq_function("bqutil.fn.cw_lower_case_ascii_only")
1251+
1252+ You can run it on scalar input. Usually you would do so to verify that
1253+ it works as expected before applying to all values in a Series.
1254+
1255+ >>> func('AURÉLIE')
1256+ 'aurÉlie'
1257+
1258+ You can apply it to a BigQuery DataFrame Series.
1259+
12501260 >>> df = bpd.DataFrame({'id': [1, 2, 3], 'name': ['AURÉLIE', 'CÉLESTINE', 'DAPHNÉ']})
12511261 >>> df
12521262 id name
@@ -1256,7 +1266,6 @@ def read_gbq_function(
12561266 <BLANKLINE>
12571267 [3 rows x 2 columns]
12581268
1259- >>> func = bpd.read_gbq_function("bqutil.fn.cw_lower_case_ascii_only")
12601269 >>> df1 = df.assign(new_name=df['name'].apply(func))
12611270 >>> df1
12621271 id name new_name
@@ -1266,9 +1275,17 @@ def read_gbq_function(
12661275 <BLANKLINE>
12671276 [3 rows x 3 columns]
12681277
1278+ You can even use a function with multiple inputs. For example, let's use
1279+ [cw_instr4](https://github.com/GoogleCloudPlatform/bigquery-utils/blob/master/udfs/community/README.md#cw_instr4source-string-search-string-position-int64-ocurrence-int64)
1280+ from Community UDFs.
1281+
1282+ >>> func = bpd.read_gbq_function("bqutil.fn.cw_instr4")
1283+ >>> func('TestStr123456Str', 'Str', 1, 2)
1284+ 14
1285+
12691286 Args:
12701287 function_name (str):
1271- the function's name in BigQuery in the format
1288+ The function's name in BigQuery in the format
12721289 `project_id.dataset_id.function_name`, or
12731290 `dataset_id.function_name` to load from the default project, or
12741291 `function_name` to load from the default project and the dataset
0 commit comments