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

FEAT: Add Struct.from_dict #2514

Merged
merged 2 commits into from
Nov 6, 2020
Merged

Conversation

icexelloss
Copy link
Contributor

This should be self explanatory.

@icexelloss icexelloss added the expressions Issues or PRs related to the expression API label Nov 5, 2020
@icexelloss icexelloss closed this Nov 5, 2020
@icexelloss icexelloss reopened this Nov 5, 2020
@@ -526,6 +526,13 @@ def from_tuples(
names, types = zip(*pairs)
return cls(list(names), list(map(dtype, types)), nullable=nullable)

@classmethod
def from_dict(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may want to consider dispatching in the future, like: https://github.com/ibis-project/ibis/blob/master/ibis/expr/schema.py#L172

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohoh good point!

@jreback jreback added this to the Next Feature Release milestone Nov 6, 2020
@jreback jreback merged commit c7f5bde into ibis-project:master Nov 6, 2020
@jreback
Copy link
Contributor

jreback commented Nov 6, 2020

thanks @icexelloss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expressions Issues or PRs related to the expression API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants