fastai / course22

The fast.ai course notebooks
https://course.fast.ai
2.39k stars 934 forks source link

Fix df merge issue. #106

Open vattay opened 9 months ago

vattay commented 9 months ago

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])
review-notebook-app[bot] commented 9 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB