Skip to content
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

Use polars to work with tabular data #712

Closed
lars-reimann opened this issue May 4, 2024 · 1 comment · Fixed by #744
Closed

Use polars to work with tabular data #712

lars-reimann opened this issue May 4, 2024 · 1 comment · Fixed by #744
Assignees
Labels
enhancement 💡 New feature or request performance 🏃 Speed things up released Included in a release

Comments

@lars-reimann
Copy link
Member

lars-reimann commented May 4, 2024

Is your feature request related to a problem?

Some operations are very slow with pandas. Their transition to PyArrow is also going to take long.

Desired solution

Use polars instead, maybe even its lazy mode.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

@lars-reimann lars-reimann added enhancement 💡 New feature or request performance 🏃 Speed things up labels May 4, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Library May 4, 2024
lars-reimann added a commit that referenced this issue May 6, 2024
…polars (#731)

Closes partially #712

### Summary of Changes

Add (mostly empty) classes for a new implementation of the tabular
containers with `polars`.

---------

Co-authored-by: megalinter-bot <[email protected]>
Co-authored-by: Alexander <[email protected]>
lars-reimann added a commit that referenced this issue May 6, 2024
Closes partially #712

### Summary of Changes

Add an implementation of a row based on a polars-backed **Table**. This
allows us to keep using callbacks for filters etc., and still have
vectorized operations.

---------

Co-authored-by: megalinter-bot <[email protected]>
lars-reimann added a commit that referenced this issue May 6, 2024
Closes partially #712

### Summary of Changes

Add a basic implementation of a cell backed by a **Column**. This allows
vectorized computations. For now, only some operators are overwritten.

---------

Co-authored-by: megalinter-bot <[email protected]>
@lars-reimann lars-reimann self-assigned this May 7, 2024
@lars-reimann lars-reimann moved this from Backlog to In Progress in Library May 7, 2024
lars-reimann added a commit that referenced this issue May 7, 2024
Closes partially #712

### Summary of Changes

* Implement a column backed by a `polars` series.
* Implement several methods in the `ExperimentalTable` class. Benchmarks
are looking promising.
* Add a new implementation of a cell backed by a `polars` expression.
* Schema and data type backed by corresponding `polars` concepts.

---------

Co-authored-by: megalinter-bot <[email protected]>
@github-project-automation github-project-automation bot moved this from In Progress to ✔️ Done in Library May 9, 2024
lars-reimann pushed a commit that referenced this issue May 9, 2024
## [0.24.0](v0.23.0...v0.24.0) (2024-05-09)

### Features

* `Column.plot_histogram()` using `Table.plot_histograms` for consistent results ([#726](#726)) ([576492c](576492c))
* `Regressor.summarize_metrics` and `Classifier.summarize_metrics` ([#729](#729)) ([1cc14b1](1cc14b1)), closes [#713](#713)
* `Table.keep_only_rows` ([#721](#721)) ([923a6c2](923a6c2))
* `Table.remove_rows` ([#720](#720)) ([a1cdaef](a1cdaef)), closes [#698](#698)
* Add `ImageDataset` and Layer for ConvolutionalNeuralNetworks ([#645](#645)) ([5b6d219](5b6d219)), closes [#579](#579) [#580](#580) [#581](#581)
* added load_percentage parameter to ImageList.from_files to load a subset of the given files ([#739](#739)) ([0564b52](0564b52)), closes [#736](#736)
* added rnn layer and TimeSeries conversion ([#615](#615)) ([6cad203](6cad203)), closes [#614](#614) [#648](#648) [#656](#656) [#601](#601)
* Basic implementation of cell with polars ([#734](#734)) ([004630b](004630b)), closes [#712](#712)
* deprecate `Table.add_column` and `Table.add_row` ([#723](#723)) ([5dd9d02](5dd9d02)), closes [#722](#722)
* deprecated `Table.from_excel_file` and `Table.to_excel_file` ([#728](#728)) ([c89e0bf](c89e0bf)), closes [#727](#727)
* Larger histogram plot if table only has one column ([#716](#716)) ([31ffd12](31ffd12))
* polars implementation of a column ([#738](#738)) ([732aa48](732aa48)), closes [#712](#712)
* polars implementation of a row ([#733](#733)) ([ff627f6](ff627f6)), closes [#712](#712)
* polars implementation of table ([#744](#744)) ([fc49895](fc49895)), closes [#638](#638) [#641](#641) [#649](#649) [#712](#712)
* regularization for decision trees and random forests ([#730](#730)) ([102de2d](102de2d)), closes [#700](#700)
* Remove device information in image class ([#735](#735)) ([d783caa](d783caa)), closes [#524](#524)
* return fitted transformer and transformed table from `fit_and_transform` ([#724](#724)) ([2960d35](2960d35)), closes [#613](#613)

### Bug Fixes

* make `Image.clone` internal ([#725](#725)) ([215a472](215a472)), closes [#626](#626)

### Performance Improvements

* improved performance of `TabularDataset.__eq__` by a factor of up to 2 ([#697](#697)) ([cd7f55b](cd7f55b))
@lars-reimann
Copy link
Member Author

🎉 This issue has been resolved in version 0.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request performance 🏃 Speed things up released Included in a release
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant