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

RM-48 factor to_pandas_dtype into dictionary #233

Conversation

ryantimjohn
Copy link
Contributor

No description provided.

RM-48 check if is callable

RM-48 call only when complicated

RM-48 factor to_pandas_dtype into dictionary
@ryantimjohn ryantimjohn force-pushed the RM-48-records_mover-records-schema-field-__init__.py-202-5-C901-RecordsSchemaField.to_pandas_dtype-is-too-complex-22 branch from 0441a25 to f4b0137 Compare March 27, 2023 19:30
…nit__.py-202-5-C901-RecordsSchemaField.to_pandas_dtype-is-too-complex-22
@ryantimjohn ryantimjohn marked this pull request as ready for review March 27, 2023 19:30
@ryantimjohn ryantimjohn requested a review from Brunope March 27, 2023 19:32
}

pd_dtype = field_type_to_pd_dtype_map.get(self.field_type)
if not pd_dtype:
Copy link
Collaborator

Choose a reason for hiding this comment

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

if pd_dtype is None

raise NotImplementedError("Teach me how to handle records schema "
f"type {self.field_type}")
if self.field_type in ('integer', 'decimal') and callable(pd_dtype):
Copy link
Collaborator

Choose a reason for hiding this comment

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

kind of weird to make the map but then have to special case certain types again anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah... the other option was to have everything be a lambda again which was kind of a drag. Open to talking through ideas here on Monday!

@ryantimjohn
Copy link
Contributor Author

@Brunope oh no, I'm getting the same error you are in #234 and #231 </3

@Brunope
Copy link
Collaborator

Brunope commented Mar 30, 2023

yeah its broken on main

Brunope and others added 2 commits March 30, 2023 12:47
…to RM-48-records_mover-records-schema-field-__init__.py-202-5-C901-RecordsSchemaField.to_pandas_dtype-is-too-complex-22
@ryantimjohn ryantimjohn added this pull request to the merge queue Mar 31, 2023
Merged via the queue into main with commit 0e2ca7c Mar 31, 2023
@ryantimjohn ryantimjohn deleted the RM-48-records_mover-records-schema-field-__init__.py-202-5-C901-RecordsSchemaField.to_pandas_dtype-is-too-complex-22 branch April 18, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants