-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update load_dataframe
#1
Conversation
todo at some point in the future- make sure we're importing the projection constant everywhere it's used. |
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.
Approved with some nits and heartfelt desire for passing tests
values: dict[Union[str, Geography], Any], | ||
) -> None: | ||
"""Sets the values of a column on a collection of geographies. | ||
|
||
Args: | ||
path_or_col: Short identifier for the column or a `Column` metadata object. | ||
path: Short identifier for the column. Only this or `col` should be provided. |
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.
Can you update this comment about the behavior of the function when both path and col are passed?
values: dict[Union[str, Geography], Any], | ||
client: Optional[httpx.AsyncClient] = None, | ||
) -> None: | ||
"""Asynchronously sets the values of a column on a collection of geographies. | ||
|
||
Args: | ||
path_or_col: Short identifier for the column or a `Column` metadata object. | ||
path: Short identifier for the column. Only this or `col` should be provided. |
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.
same as above, pls clarify behavior for different combinations of path or col provided
Main thing in this PR are some updates to the
load_dataframe
function. I did some major refactoring of the function and added a lot of validation to the client side so that we can narrow the scope of allowable behavior for users. I also tried to make sure that the error messages that are spat out are intelligible and give the user a hint as to how to fix whatever part of their workflow is messed up.The other small thing in this is that the
normalize_path
function has been updated to disallow certain substrings that can cause issues when querying the API.