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

fix pandas package feature warning (issue #19) #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

psychAo
Copy link

@psychAo psychAo commented Jan 19, 2022

Issue #19 reported a feature warning while using pandas package. The details can be found at (https://pandas.pydata.org/pandas-docs/stable/whatsnew/v1.3.0.html#deprecations).
To sum up, users need to select only valid columns before calling the reduction function (e.g. .min, .max, .sum) on a DataFrame.
So, in line 113 "df_sum = df.sum()" is replaced with "df_sum = df[["params_nt", "Mult-Adds", "Params", "Non-trainable params"]].sum()".
This columns are useful to show the final table of network's information.
Without redundant .sum() caculations on other columns, very very little time also can be saved : )

Issue nmhkahn#19 reported a feature warning while using pandas package. The details can be found at (https://pandas.pydata.org/pandas-docs/stable/whatsnew/v1.3.0.html#deprecations).
To sum up, users need to select only valid columns before calling the reduction function (e.g. .min, .max, .sum) on a DataFrame.
So, in line 113 "df_sum = df.sum()" is replaced with "df_sum = df[["params_nt", "Mult-Adds", "Params", "Non-trainable params"]].sum()".
This columns are useful to show the final table of network's information.
Without redundant .sum() caculations on other columns, very very little time also can be saved : )
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.

None yet

1 participant