Kaggle competition: Aerial Cactus Identification
train['LotFrontage'] = train.groupby('Neighborhood')['LotFrontage'].transform(lambda x: x.fillna(x.median()))
test['LotFrontage'] = test.groupby('Neighborhood')['LotFrontage'].transform(lambda x: x.fillna(x.median()))<count_values>
from pathlib import Path
from fastai import *
from fastai.vision import *
import torch
train['Street'].value_counts(dropna=False )<count_values>
data_folder = Path(".. /input" )
test['Street'].value_counts(dropna=False )<drop_column>
train_df = pd.read_csv(".. /input/train.csv")
 test_df = pd.read_csv(".. /input/sample_submission.csv" )
train.drop('Street',axis=1,inplace=True)
 test.drop('Street',axis=1,inplace=True )<count_values>
train_img.show_batch(rows=3, figsize=(7,6))
train['Utilities'].value_counts(dropna=False )<count_values>
learn = cnn_learner(train_img, models.densenet161, metrics=[error_rate, accuracy] )
test['Utilities'].value_counts(dropna=False )<drop_column>
lr = 3e-02
learn.fit_one_cycle(5, slice(lr))
<drop_column><EOS> 
preds,_ = learn.get_preds(ds_type=DatasetType.Test)
 test_df.has_cactus = preds.numpy() [:, 0]
test_df.to_csv('submission.csv', index=False )