You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes#875Closes#877
Closes partially #977
### Summary of Changes
Stabilize the API of the `Table` class. This PR introduces several
breaking changes to this class:
- All optional parameters are now keyword-only, so we can reposition
them later.
- The `data` parameter of `__init__` is now required.
- Rename `remove_columns_except` to `select_columns`
- The new method can also be called with a callback that determines
which columns to select.
- Rename `add_table_as_columns` to `add_tables_as_columns`
- Multiple tables can now be passed at once.
- Rename `add_table_as_rows` to `add_tables_as_rows`
- Multiple tables can now be passed at once.
It also adds new functionality throughout the library:
- New method `Table.add_index_column` to add a new column with
auto-incrementing integer values to a table.
- New method `Table.filter_rows` to keep only the rows matched by some
predicate.
- New method `Table.filter_rows_by_column` to keep only the rows that
have a value in a specific column that matches some predicate.
- New parameter `random_seed` for `Table.shuffle_rows` and
`Table.split_rows` to control the pseudorandom number generator.
Previously, the methods were deterministic, but the seed was hidden.
- New parameter `missing_value_ratio_threshold` of
`Table.remove_columns_with_missing_values` to be able to keep columns
with only a few missing values.
- Various static factory methods under `ColumnType` to instantiate
column types. This prepares for #754.
Finally, the methods `Table.summarize_statistics` and
`Column.summarize_statistics` are now considerably faster.
---------
Co-authored-by: megalinter-bot <[email protected]>
Tests for methods of
DataType
(interface) and_PolarsDataType
(implementation),Schema
(interface) and_PolarsSchema
(implementation)are missing entirely or for some edge cases.
We should
test_data_type.py
andtest_schema.py
_data_type
and_schema
insidetests/safeds/data/tabular/typing
DataType
andSchema
(same structure as for containers of tabular data).Use parametrized tests to cover edge cases.
The text was updated successfully, but these errors were encountered: