-
Notifications
You must be signed in to change notification settings - Fork 109
Fix df from result table error message + old types #543
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
Conversation
…e_from_result_table func
if isinstance(converter, str): | ||
frame[column_name] = frame[column_name].astype(converter) | ||
else: | ||
if converter is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this before the isinstance
@@ -18,14 +18,22 @@ def default_dict() -> Converter: | |||
return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test with an alias name, and with a missing type name
if isinstance(converter, str): | ||
frame[column_name] = frame[column_name].astype(converter) | ||
else: | ||
if converter is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move None check before isinstance
…ub.com/Azure/azure-kusto-python into fix_df_from_result_table_error_message
assert type(df_int_to_float.iloc[0].RecordInt) is numpy.float64 | ||
assert df.iloc[0].RecordInt == 5678 | ||
|
||
# Testing missing type conversion | ||
raised = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use pytest.raises
fixed error message in case of none existing type
added old type names in kusto to default dictionary #542