diff --git a/apps/hello/main.py b/apps/hello/main.py index 40462ed07..f45f4b4b1 100644 --- a/apps/hello/main.py +++ b/apps/hello/main.py @@ -75,7 +75,7 @@ def _get_editable_df(): 'object': [{"updatedAt": None}, {"updatedAt": None}, {"updatedAt": None}], 'text': ['one', 'two', 'three'], }) - return wf.EditableDataframe(df) + return wf.EditableDataFrame(df) def _get_highlighted_members(): sample_df = _get_main_df().sample(3).set_index("name", drop=False) diff --git a/docs/framework/dataframe.mdx b/docs/framework/dataframe.mdx index ec52caf57..6a6ddc483 100644 --- a/docs/framework/dataframe.mdx +++ b/docs/framework/dataframe.mdx @@ -9,7 +9,7 @@ it offers components as `dataframe` to manipulate dataframes. These components a |--------------------|---------------------------------------| | `pandas.DataFrame` | x | | `polar.DataFrame` | x | -| `list of records` | x (with `EditableDataframe`) | +| `list of records` | x (with `EditableDataFrame`) | ## Use a dataframe @@ -26,7 +26,7 @@ wf.init_state({ ## Prepare a dataframe for editing -**writer provides `EditableDataframe` as a helper to facilitate manipulation**. it makes it easier to write event handlers such as adding a line, +**writer provides `EditableDataFrame` as a helper to facilitate manipulation**. it makes it easier to write event handlers such as adding a line, deleting it or modifying a value, etc... ```python @@ -36,7 +36,7 @@ import writer as wf df = pandas.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]}) wf.init_state({ - 'mydf': wf.EditableDataframe(df) + 'mydf': wf.EditableDataFrame(df) }) ``` @@ -50,7 +50,7 @@ import writer as wf df = pandas.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]}) wf.init_state({ - 'mydf': wf.EditableDataframe(df) + 'mydf': wf.EditableDataFrame(df) }) # Subscribe this event handler to the `wf-dataframe-add` event @@ -76,9 +76,9 @@ def on_record_action(state, payload): state['record'] = state['df'].record(record_index) # dict representation of record ``` -### Datastructures supported by `EditableDataframe` +### Datastructures supported by `EditableDataFrame` -`EditableDataframe` can be used with a panda dataframe, a polar dataframe and list of records. +`EditableDataFrame` can be used with a panda dataframe, a polar dataframe and list of records. ```python import pandas @@ -91,8 +91,8 @@ polars_df = polars.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]}) list_of_records = [{'a': 1, 'b': 4}, {'a': 2, 'b': 5}, {'a': 3, 'b': 6}] wf.init_state({ - 'mypandas': wf.EditableDataframe(panda_df), - 'mypolars': wf.EditableDataframe(polars_df), - 'mylistofrecords': wf.EditableDataframe(list_of_records) + 'mypandas': wf.EditableDataFrame(panda_df), + 'mypolars': wf.EditableDataFrame(polars_df), + 'mylistofrecords': wf.EditableDataFrame(list_of_records) }) ``` diff --git a/src/ui/src/components/core/content/CoreDataframe.vue b/src/ui/src/components/core/content/CoreDataframe.vue index fa9470da4..c062ddeda 100644 --- a/src/ui/src/components/core/content/CoreDataframe.vue +++ b/src/ui/src/components/core/content/CoreDataframe.vue @@ -139,23 +139,30 @@ const description = "A component to display Pandas DataFrames."; const dataFrameUpdateHandlerStub = ` # Subscribe this event handler to the \`wf-dataframe-update\` event +# +# more on : https://dev.writer.com/framework/dataframe def on_record_change(state, payload): - state['mydf'].record_update(payload)`; + state['mydf'].record_update(payload) # should contain an EditableDataFrame instance`; const dataFrameAddHandlerStub = ` # Subscribe this event handler to the \`wf-dataframe-add\` event +# +# more on : https://dev.writer.com/framework/dataframe def on_record_add(state, payload): payload['record']['sales'] = 0 # default value inside the dataframe - state['mydf'].record_add(payload)`; + state['mydf'].record_add(payload) # should contain an EditableDataFrame instance`; const dataFrameActionHandlerStub = ` # Subscribe this event handler to the \`wf-dataframe-action\` event +# +# more on : https://dev.writer.com/framework/dataframe def on_record_action(state, payload): + # state['mydf'] should contains an EditableDataFrame instance record_index = payload['record_index'] if payload['action'] == 'remove': - state['mydf'].record_remove(payload) + state['mydf'].record_remove(payload) # should contain an EditableDataFrame instance if payload['action'] == 'open': - state['record'] = state['df'].record(record_index) # dict representation of record`; + state['record'] = state['mydf'].record(record_index) # dict representation of record`; export default { writer: { diff --git a/src/writer/__init__.py b/src/writer/__init__.py index b0ff35089..2f3a8616e 100644 --- a/src/writer/__init__.py +++ b/src/writer/__init__.py @@ -21,7 +21,7 @@ from writer.core import ( writerproperty as property, ) -from writer.core_df import EditableDataframe +from writer.core_df import EditableDataFrame try: from writer.ui import WriterUIManager diff --git a/src/writer/core.py b/src/writer/core.py index 74f40cd99..9c8fb56fa 100644 --- a/src/writer/core.py +++ b/src/writer/core.py @@ -281,7 +281,7 @@ class StateSerialiser: """ def serialise(self, v: Any) -> Union[Dict, List, str, bool, int, float, None]: from writer.ai import Conversation - from writer.core_df import EditableDataframe + from writer.core_df import EditableDataFrame if isinstance(v, State): return self._serialise_dict_recursively(v.to_dict()) @@ -299,7 +299,7 @@ def serialise(self, v: Any) -> Union[Dict, List, str, bool, int, float, None]: return self._serialise_list_recursively(v) if isinstance(v, (str, bool)): return v - if isinstance(v, EditableDataframe): + if isinstance(v, EditableDataFrame): table = v.pyarrow_table() return self._serialise_pyarrow_table(table) if v is None: diff --git a/src/writer/core_df.py b/src/writer/core_df.py index f5e694798..c80c65e44 100644 --- a/src/writer/core_df.py +++ b/src/writer/core_df.py @@ -8,7 +8,7 @@ import pyarrow # type: ignore from .core import MutableValue, import_failure -from .ss_types import DataframeRecordAdded, DataframeRecordRemoved, DataframeRecordUpdated +from .ss_types import DataFrameRecordAdded, DataFrameRecordRemoved, DataFrameRecordUpdated if TYPE_CHECKING: import pandas @@ -38,37 +38,37 @@ def record(df: Any, record_index: int) -> dict: """ This method read a record at the given line and get it back as dictionary - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> r = edf.record(1) """ raise NotImplementedError @staticmethod - def record_add(df: Any, payload: DataframeRecordAdded) -> Any: + def record_add(df: Any, payload: DataFrameRecordAdded) -> Any: """ signature of the methods to be implemented to process wf-dataframe-add event - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_add({"record": {"a": 1, "b": 2}}) """ raise NotImplementedError @staticmethod - def record_update(df: Any, payload: DataframeRecordUpdated) -> Any: + def record_update(df: Any, payload: DataFrameRecordUpdated) -> Any: """ signature of the methods to be implemented to process wf-dataframe-update event - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_update({"record_index": 12, "record": {"a": 1, "b": 2}}) """ raise NotImplementedError @staticmethod - def record_remove(df: Any, payload: DataframeRecordRemoved) -> Any: + def record_remove(df: Any, payload: DataFrameRecordRemoved) -> Any: """ signature of the methods to be implemented to process wf-dataframe-action event - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_remove({"record_index": 12}) """ raise NotImplementedError @@ -86,7 +86,7 @@ class PandasRecordProcessor(DataframeRecordProcessor): PandasRecordProcessor processes records from a pandas dataframe saved into an EditableDataframe >>> df = pandas.DataFrame({"a": [1, 2], "b": [3, 4]}) - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_add({"a": 1, "b": 2}) """ @@ -100,7 +100,7 @@ def match(df: Any) -> bool: def record(df: 'pandas.DataFrame', record_index: int) -> dict: """ - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> r = edf.record(1) """ import pandas @@ -118,9 +118,9 @@ def record(df: 'pandas.DataFrame', record_index: int) -> dict: return dict(record) @staticmethod - def record_add(df: 'pandas.DataFrame', payload: DataframeRecordAdded) -> 'pandas.DataFrame': + def record_add(df: 'pandas.DataFrame', payload: DataFrameRecordAdded) -> 'pandas.DataFrame': """ - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_add({"record": {"a": 1, "b": 2}}) """ import pandas @@ -137,9 +137,9 @@ def record_add(df: 'pandas.DataFrame', payload: DataframeRecordAdded) -> 'pandas return pandas.concat([df, new_df]) @staticmethod - def record_update(df: 'pandas.DataFrame', payload: DataframeRecordUpdated) -> 'pandas.DataFrame': + def record_update(df: 'pandas.DataFrame', payload: DataFrameRecordUpdated) -> 'pandas.DataFrame': """ - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_update({"record_index": 12, "record": {"a": 1, "b": 2}}) """ import pandas @@ -162,9 +162,9 @@ def record_update(df: 'pandas.DataFrame', payload: DataframeRecordUpdated) -> 'p return df @staticmethod - def record_remove(df: 'pandas.DataFrame', payload: DataframeRecordRemoved) -> 'pandas.DataFrame': + def record_remove(df: 'pandas.DataFrame', payload: DataFrameRecordRemoved) -> 'pandas.DataFrame': """ - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_remove({"record_index": 12}) """ record_index: int = payload['record_index'] @@ -187,7 +187,7 @@ class PolarRecordProcessor(DataframeRecordProcessor): PolarRecordProcessor processes records from a polar dataframe saved into an EditableDataframe >>> df = polars.DataFrame({"a": [1, 2], "b": [3, 4]}) - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_add({"record": {"a": 1, "b": 2}}) """ @@ -201,7 +201,7 @@ def match(df: Any) -> bool: def record(df: 'polars.DataFrame', record_index: int) -> dict: """ - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> r = edf.record(1) """ record = {} @@ -213,7 +213,7 @@ def record(df: 'polars.DataFrame', record_index: int) -> dict: @staticmethod - def record_add(df: 'polars.DataFrame', payload: DataframeRecordAdded) -> 'polars.DataFrame': + def record_add(df: 'polars.DataFrame', payload: DataFrameRecordAdded) -> 'polars.DataFrame': _assert_record_match_polar_df(df, payload['record']) import polars @@ -221,7 +221,7 @@ def record_add(df: 'polars.DataFrame', payload: DataframeRecordAdded) -> 'polars return polars.concat([df, new_df]) @staticmethod - def record_update(df: 'polars.DataFrame', payload: DataframeRecordUpdated) -> 'polars.DataFrame': + def record_update(df: 'polars.DataFrame', payload: DataFrameRecordUpdated) -> 'polars.DataFrame': # This implementation works but is not optimal. # I didn't find a better way to update a record in polars # @@ -236,7 +236,7 @@ def record_update(df: 'polars.DataFrame', payload: DataframeRecordUpdated) -> 'p return df @staticmethod - def record_remove(df: 'polars.DataFrame', payload: DataframeRecordRemoved) -> 'polars.DataFrame': + def record_remove(df: 'polars.DataFrame', payload: DataFrameRecordRemoved) -> 'polars.DataFrame': import polars record_index: int = payload['record_index'] @@ -257,7 +257,7 @@ class RecordListRecordProcessor(DataframeRecordProcessor): RecordListRecordProcessor processes records from a list of record saved into an EditableDataframe >>> df = [{"a": 1, "b": 2}, {"a": 3, "b": 4}] - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_add({"record": {"a": 1, "b": 2}}) """ @@ -270,20 +270,20 @@ def match(df: Any) -> bool: def record(df: List[Dict[str, Any]], record_index: int) -> dict: """ - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> r = edf.record(1) """ r = df[record_index] return copy.copy(r) @staticmethod - def record_add(df: List[Dict[str, Any]], payload: DataframeRecordAdded) -> List[Dict[str, Any]]: + def record_add(df: List[Dict[str, Any]], payload: DataFrameRecordAdded) -> List[Dict[str, Any]]: _assert_record_match_list_of_records(df, payload['record']) df.append(payload['record']) return df @staticmethod - def record_update(df: List[Dict[str, Any]], payload: DataframeRecordUpdated) -> List[Dict[str, Any]]: + def record_update(df: List[Dict[str, Any]], payload: DataFrameRecordUpdated) -> List[Dict[str, Any]]: _assert_record_match_list_of_records(df, payload['record']) record_index = payload['record_index'] @@ -293,7 +293,7 @@ def record_update(df: List[Dict[str, Any]], payload: DataframeRecordUpdated) -> return df @staticmethod - def record_remove(df: List[Dict[str, Any]], payload: DataframeRecordRemoved) -> List[Dict[str, Any]]: + def record_remove(df: List[Dict[str, Any]], payload: DataFrameRecordRemoved) -> List[Dict[str, Any]]: del(df[payload['record_index']]) return df @@ -314,13 +314,13 @@ def pyarrow_table(df: List[Dict[str, Any]]) -> pyarrow.Table: return table -class EditableDataframe(MutableValue): +class EditableDataFrame(MutableValue): """ Editable Dataframe makes it easier to process events from components that modify a dataframe like the dataframe editor. >>> initial_state = wf.init_state({ - >>> "df": wf.EditableDataframe(df) + >>> "df": wf.EditableDataFrame(df) >>> }) Editable Dataframe is compatible with a pandas, thrillers or record list dataframe @@ -348,12 +348,12 @@ def df(self, value: Union['pandas.DataFrame', 'polars.DataFrame', List[dict]]) - self._df = value self.mutate() - def record_add(self, payload: DataframeRecordAdded) -> None: + def record_add(self, payload: DataFrameRecordAdded) -> None: """ Adds a record to the dataframe >>> df = pandas.DataFrame({"a": [1, 2], "b": [3, 4]}) - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_add({"record": {"a": 1, "b": 2}}) """ assert self.processor is not None @@ -361,7 +361,7 @@ def record_add(self, payload: DataframeRecordAdded) -> None: self._df = self.processor.record_add(self.df, payload) self.mutate() - def record_update(self, payload: DataframeRecordUpdated) -> None: + def record_update(self, payload: DataFrameRecordUpdated) -> None: """ Updates a record in the dataframe @@ -369,7 +369,7 @@ def record_update(self, payload: DataframeRecordUpdated) -> None: It must a value for each index / column. >>> df = pandas.DataFrame({"a": [1, 2], "b": [3, 4]}) - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_update({"record_index": 0, "record": {"a": 2, "b": 2}}) """ assert self.processor is not None @@ -377,12 +377,12 @@ def record_update(self, payload: DataframeRecordUpdated) -> None: self._df = self.processor.record_update(self.df, payload) self.mutate() - def record_remove(self, payload: DataframeRecordRemoved) -> None: + def record_remove(self, payload: DataFrameRecordRemoved) -> None: """ Removes a record from the dataframe >>> df = pandas.DataFrame({"a": [1, 2], "b": [3, 4]}) - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> edf.record_remove({"record_index": 0}) """ assert self.processor is not None @@ -397,7 +397,7 @@ def pyarrow_table(self) -> pyarrow.Table: This mechanism is used for serializing data for transmission to the frontend. >>> df = pandas.DataFrame({"a": [1, 2], "b": [3, 4]}) - >>> edf = EditableDataframe(df) + >>> edf = EditableDataFrame(df) >>> pa_table = edf.pyarrow_table() """ assert self.processor is not None diff --git a/src/writer/ss_types.py b/src/writer/ss_types.py index efa801cf6..31191f960 100644 --- a/src/writer/ss_types.py +++ b/src/writer/ss_types.py @@ -188,14 +188,14 @@ class HashRequestResponse(AppProcessServerRequest): AppProcessServerResponsePacket = Tuple[int, Optional[str], AppProcessServerResponse] -class DataframeRecordAdded(TypedDict): +class DataFrameRecordAdded(TypedDict): record: Dict[str, Any] -class DataframeRecordUpdated(TypedDict): +class DataFrameRecordUpdated(TypedDict): record_index: int record: Dict[str, Any] -class DataframeRecordRemoved(TypedDict): +class DataFrameRecordRemoved(TypedDict): record_index: int class WriterEventResult(TypedDict): @@ -230,4 +230,4 @@ class WorkflowExecutionLog(BaseModel): class WriterConfigurationError(ValueError): - pass \ No newline at end of file + pass diff --git a/tests/backend/test_core.py b/tests/backend/test_core.py index 810b5d293..bb1d1e04c 100644 --- a/tests/backend/test_core.py +++ b/tests/backend/test_core.py @@ -1297,7 +1297,7 @@ def session_verifier_2(headers: Dict[str, str]) -> None: assert s_invalid is None -class TestEditableDataframe: +class TestEditableDataFrame: def test_editable_dataframe_expose_pandas_dataframe_as_df_property(self) -> None: df = pandas.DataFrame({ @@ -1305,7 +1305,7 @@ def test_editable_dataframe_expose_pandas_dataframe_as_df_property(self) -> None "age": [25, 30, 35] }) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) assert edf.df is not None assert isinstance(edf.df, pandas.DataFrame) @@ -1316,7 +1316,7 @@ def test_editable_dataframe_register_mutation_when_df_is_updated(self) -> None: "age": [25, 30, 35] }) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When edf.df.loc[0, "age"] = 26 @@ -1330,7 +1330,7 @@ def test_editable_dataframe_should_read_record_as_dict_based_on_record_index(sel "name": ["Alice", "Bob", "Charlie"], "age": [25, 30, 35] }) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When r = edf.record(0) @@ -1346,7 +1346,7 @@ def test_editable_dataframe_should_read_record_as_dict_based_on_record_index_whe }) df = df.set_index('name') - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When r = edf.record(0) @@ -1363,7 +1363,7 @@ def test_editable_dataframe_should_read_record_as_dict_based_on_record_index_whe }) df = df.set_index(['name', 'city']) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When r = edf.record(0) @@ -1379,7 +1379,7 @@ def test_editable_dataframe_should_process_new_record_into_dataframe(self) -> No "age": [25, 30, 35] }) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When edf.record_add({"record": {"name": "David", "age": 40}}) @@ -1395,7 +1395,7 @@ def test_editable_dataframe_should_process_new_record_into_dataframe_with_index( }) df = df.set_index('name') - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When edf.record_add({"record": {"name": "David", "age": 40}}) @@ -1411,7 +1411,7 @@ def test_editable_dataframe_should_process_new_record_into_dataframe_with_multii }) df = df.set_index(['name', 'city']) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When edf.record_add({"record": {"name": "David", "age": 40, "city": "Berlin"}}) @@ -1428,7 +1428,7 @@ def test_editable_dataframe_should_update_existing_record_as_dateframe_with_mult df = df.set_index(['name', 'city']) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When edf.record_update({"record_index": 0, "record": {"name": "Alicia", "age": 25, "city": "Paris"}}) @@ -1445,7 +1445,7 @@ def test_editable_dataframe_should_remove_existing_record_as_dateframe_with_mult df = df.set_index(['name', 'city']) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When edf.record_remove({"record_index": 0}) @@ -1461,7 +1461,7 @@ def test_editable_dataframe_should_serialize_pandas_dataframe_with_multiindex(se }) df = df.set_index(['name', 'city']) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When table = edf.pyarrow_table() @@ -1475,7 +1475,7 @@ def test_editable_dataframe_expose_polar_dataframe_in_df_property(self) -> None: "age": [25, 30, 35] }) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) assert edf.df is not None assert isinstance(edf.df, polars.DataFrame) @@ -1484,7 +1484,7 @@ def test_editable_dataframe_should_read_record_from_polar_as_dict_based_on_recor "name": ["Alice", "Bob", "Charlie"], "age": [25, 30, 35] }) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When r = edf.record(0) @@ -1499,7 +1499,7 @@ def test_editable_dataframe_should_process_new_record_into_polar_dataframe(self) "age": [25, 30, 35] }) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When edf.record_add({"record": {"name": "David", "age": 40}}) @@ -1513,7 +1513,7 @@ def test_editable_dataframe_should_update_existing_record_into_polar_dataframe(s "age": [25, 30, 35] }) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When edf.record_update({"record_index": 0, "record": {"name": "Alicia", "age": 25}}) @@ -1527,7 +1527,7 @@ def test_editable_dataframe_should_remove_existing_record_into_polar_dataframe(s "age": [25, 30, 35] }) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When edf.record_remove({"record_index": 0}) @@ -1542,7 +1542,7 @@ def test_editable_dataframe_should_serialize_polar_dataframe(self) -> None: "city": ["Paris", "London", "New York"] }) - edf = wf.EditableDataframe(df) + edf = wf.EditableDataFrame(df) # When table = edf.pyarrow_table() @@ -1558,7 +1558,7 @@ def test_editable_dataframe_expose_list_of_records_in_df_property(self) -> None: {"name": "Charlie", "age": 35} ] - edf = wf.EditableDataframe(records) + edf = wf.EditableDataFrame(records) assert edf.df is not None assert isinstance(edf.df, list) @@ -1570,7 +1570,7 @@ def test_editable_dataframe_should_read_record_from_list_of_record_as_dict_based {"name": "Charlie", "age": 35} ] - edf = wf.EditableDataframe(records) + edf = wf.EditableDataFrame(records) # When r = edf.record(0) @@ -1586,7 +1586,7 @@ def test_editable_dataframe_should_process_new_record_into_list_of_records(self) {"name": "Charlie", "age": 35} ] - edf = wf.EditableDataframe(records) + edf = wf.EditableDataFrame(records) # When edf.record_add({"record": {"name": "David", "age": 40}}) @@ -1602,7 +1602,7 @@ def test_editable_dataframe_should_update_existing_record_into_list_of_record(se {"name": "Charlie", "age": 35} ] - edf = wf.EditableDataframe(records) + edf = wf.EditableDataFrame(records) # When edf.record_update({"record_index": 0, "record": {"name": "Alicia", "age": 25}}) @@ -1617,7 +1617,7 @@ def test_editable_dataframe_should_remove_existing_record_into_list_of_record(se {"name": "Charlie", "age": 35} ] - edf = wf.EditableDataframe(records) + edf = wf.EditableDataFrame(records) # When edf.record_remove({"record_index": 0}) @@ -1633,7 +1633,7 @@ def test_editable_dataframe_should_serialized_list_of_records_into_pyarrow_table {"name": "Charlie", "age": 35} ] - edf = wf.EditableDataframe(records) + edf = wf.EditableDataFrame(records) # When table = edf.pyarrow_table()