-
Notifications
You must be signed in to change notification settings - Fork 4
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
Convert between Row
and dict
#204
Labels
Comments
lars-reimann
added a commit
that referenced
this issue
Apr 18, 2023
Closes #204. ### Summary of Changes Add two methods to `Row`: * `from_dict` to create a `Row` from a `dict[str, Any]` * `to_dict` to convert a `Row` to a `dict[str, Any]` --------- Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com>
lars-reimann
pushed a commit
that referenced
this issue
Apr 21, 2023
## [0.11.0](v0.10.0...v0.11.0) (2023-04-21) ### Features * `OneHotEncoder.inverse_transform` now maintains the column order from the original table ([#195](#195)) ([3ec0041](3ec0041)), closes [#109](#109) [#109](#109) * add `plot_` prefix back to plotting methods ([#212](#212)) ([e50c3b0](e50c3b0)), closes [#211](#211) * adjust `Column`, `Schema` and `Table` to changes in `Row` ([#216](#216)) ([ca3eebb](ca3eebb)) * back `Row` by a `polars.DataFrame` ([#214](#214)) ([62ca34d](62ca34d)), closes [#196](#196) [#149](#149) * clean up `Row` class ([#215](#215)) ([b12fc68](b12fc68)) * convert between `Row` and `dict` ([#206](#206)) ([e98b653](e98b653)), closes [#204](#204) * convert between a `dict` and a `Table` ([#198](#198)) ([2a5089e](2a5089e)), closes [#197](#197) * create column types for `polars` data types ([#208](#208)) ([e18b362](e18b362)), closes [#196](#196) * dataframe interchange protocol ([#200](#200)) ([bea976a](bea976a)), closes [#199](#199) * move existing ML solutions into `safeds.ml.classical` package ([#213](#213)) ([655f07f](655f07f)), closes [#210](#210) ### Bug Fixes * `table.keep_only_columns` now maps column names to correct data ([#194](#194)) ([459ab75](459ab75)), closes [#115](#115) * typo in type hint ([#184](#184)) ([e79727d](e79727d)), closes [#180](#180)
🎉 This issue has been resolved in version 0.11.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem?
A user can convert between a
Table
and adict
by using the methodsfrom_dict
andto_dict
. Similarly, a conversion between aRow
and adict
would make sense.Desired solution
from_dict
that creates aRow
from adict[str, Any]
. Note that this differs from the thefrom_dict
method of aTable
, which expects adict[str, list[Any]]
.to_dict
that converts aRow
to adict[str, Any]
. Note that this differs from the theto_dict
method of aTable
, which creates adict[str, list[Any]]
.Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
No response
The text was updated successfully, but these errors were encountered: