@@ -190,41 +190,46 @@ def create_data_rows(client:labelboxClient, row:pandas.core.series.Series,
190
190
return_value ["data_row" ]["global_key" ] = str (row [global_key_col ])
191
191
return return_value
192
192
193
- def get_columns_function (table :pandas .core .frame .DataFrame ):
193
+ def get_columns_function (table :pandas .core .frame .DataFrame , extra_client = None ):
194
194
"""Grabs all column names from a Pandas DataFrame
195
195
Args:
196
196
table : Required (pandas.core.frame.DataFrame) - Pandas DataFrame
197
+ extra_client : Ignore this value - necessary for other labelbase integrations
197
198
Returns:
198
199
List of strings corresponding to all column names
199
200
"""
200
201
return [col for col in table .columns ]
201
202
202
- def get_unique_values_function (table :pandas .core .frame .DataFrame , column_name :str ):
203
+ def get_unique_values_function (table :pandas .core .frame .DataFrame , column_name :str , extra_client = None ):
203
204
"""Grabs all unique values from a column in a Pandas DataFrame
204
205
Args:
205
206
table : Required (pandas.core.frame.DataFrame) - Pandas DataFrame
206
207
column_name : Required (str) - Column name
208
+ extra_client : Ignore this value - necessary for other labelbase integrations
209
+
207
210
Returns:
208
211
List of strings corresponding to all unique values in a column
209
212
"""
210
213
return list (table [column_name ].unique ())
211
214
212
- def add_column_function (table :pandas .core .frame .DataFrame , column_name :str , default_value = "" ):
215
+ def add_column_function (table :pandas .core .frame .DataFrame , column_name :str , default_value = "" , extra_client = None ):
213
216
""" Adds a column of empty values to an existing Pandas DataFrame
214
217
Args:
215
218
table : Required (pandas.core.frame.DataFrame) - Pandas DataFrame
216
219
column_name : Required (str) - Column name
217
220
default_value : Optional - Value to insert for every row in the newly created column
221
+ extra_client : Ignore this value - necessary for other labelbase integrations
218
222
Returns:
219
223
Your table with a new column given the column_name and default_value
220
224
"""
221
225
table [column_name ] = default_value
222
226
return table
223
227
224
- def get_table_length_function (table :pandas .core .frame .DataFrame ):
228
+ def get_table_length_function (table :pandas .core .frame .DataFrame , extra_client = None ):
225
229
""" Tells you the size of a Pandas DataFrame
226
230
Args:
227
231
table : Required (pandas.core.frame.DataFrame) - Pandas DataFrame
232
+ extra_client : Ignore this value - necessary for other labelbase integrations
228
233
Returns:
229
234
The length of your table as an integer
230
235
"""
0 commit comments