Skip to content

Conversation

elysenko
Copy link
Contributor

@elysenko elysenko commented May 2, 2025

No description provided.

@jeenut27 jeenut27 self-requested a review June 24, 2025 14:13
Copy link
Contributor

@jeenut27 jeenut27 left a comment

Choose a reason for hiding this comment

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

Thanks @elysenko for raising this PR! I just added some comments. Please take a look

:param dataset_id: ID of the dataset on SurveyCTO
:param dataset_title: Optional title for the dataset (defaults to dataset_id)
:param append: If True, appends data; otherwise replaces the dataset
:param fill: If True, allows mismatched columns in append mode
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this parameter isn't getting used in the function. Can we remove it?
In case of mismatched columns does the API return an error?

assert isinstance(df, pd.DataFrame), "data must be a pandas DataFrame"
assert isinstance(dataset_id, str), "dataset_id must be a string"
if dataset_title is None:
dataset_title = dataset_id
Copy link
Contributor

Choose a reason for hiding this comment

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

If the dataset_title is not needed for the API, I think we can remove this from the params as well. There is no check that the title is correct and seems redundant. What do you you think?

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