course22 icon indicating copy to clipboard operation
course22 copied to clipboard

Fix df merge issue.

Open vattay opened this issue 1 year ago • 2 comments
trafficstars

Fix to get around the df merge resulting in an empty df since the results-imagenet.csv file has longer form names like "model.extrainfo".

I'm not sure why jupyter notebook is changing to much of the notebook formatting and code... if you want just the fix it is quite short:

Ensure plotly and statsmodels are installed.

! git clone --depth 1 https://github.com/rwightman/pytorch-image-models.git
%cd pytorch-image-models/results
%pip install plotly statsmodels

Merge on the prefix of the long dot split names in the results-imagenet.csv.

import pandas as pd
df_results = pd.read_csv('results-imagenet.csv')
df.rename(columns={'model': 'model_long'}, inplace=True)
df_results['model'] = df_results['model'].apply(lambda x: x.split('.')[0])

vattay avatar Nov 30 '23 14:11 vattay

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB