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

compute_mean_speed_per_frame return a pandas.series instead of a pandas.dataframe #362

Open
ThoChat opened this issue Jun 25, 2024 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@ThoChat
Copy link
Collaborator

ThoChat commented Jun 25, 2024

No description provided.

@chraibi
Copy link
Collaborator

chraibi commented Jun 25, 2024

Should we convert it to DataFrame?

df_mean_df = df_mean.reset_index()
df_mean_df.columns = [FRAME_COL, 'mean_speed']

@ThoChat
Copy link
Collaborator Author

ThoChat commented Jun 25, 2024

That's what I did in my code but I think it's worth looking at the code see if this fix is appropriate

@schroedtert
Copy link
Collaborator

schroedtert commented Jul 1, 2024

Just a reminder, changing the return type is a breaking change. If you want to change the return type, the old should still be available.

But why do you want to have a dataframe? It only consists of an index (frame) and a value, this is the use case for series

@chraibi
Copy link
Collaborator

chraibi commented Jul 1, 2024

Because the documentation of the function says that it returns a dataframe.

@schroedtert
Copy link
Collaborator

The documentation seems to be off in this case. I suggest checking what the other functions return, from the documentation DataFrame but I guess there might be some other Series hidden.

@chraibi
Copy link
Collaborator

chraibi commented Jul 1, 2024

I'll check this and I think it's better to change the documentation than to add breaking code changes

@ThoChat ThoChat added the documentation Improvements or additions to documentation label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants