{"cells":[{"metadata":{"_uuid":"2e57c31f2eba9f572bdae5adf5c790af216af8e9"},"cell_type":"markdown","source":"In this Notebook try to explore the data given for **Elo Merchant Category Recommendation** , let us compile about the compitation "},{"metadata":{"_uuid":"4811e4e7501ba3dcd2e3c728703068c69f6db53d"},"cell_type":"markdown","source":"**Elo**\n\nOne of the largest payment brands in Brazil, has built partnerships with merchants in order to offer promotions or discounts to cardholders."},{"metadata":{"_uuid":"33adddaadcba9a7df773a86653110ed47ae1b867"},"cell_type":"markdown","source":"**Objective:**\n\nBuild a model which will improve RMSE error in the predictions\n\n"},{"metadata":{"_uuid":"e4b48e3f6afc61ac6dcf1ce49698a0258a567bd1"},"cell_type":"markdown","source":"**What am I predicting?**\n\nYou are predicting a loyalty score for each card_id represented in test.csv and sample_submission.csv."},{"metadata":{"_uuid":"22f2be969933a67d3a3807458db9de4529c80117"},"cell_type":"markdown","source":"**Data Exploration**"},{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load in \n\nimport os\nimport json\nimport numpy as np\nimport pandas as pd\nfrom pandas.io.json import json_normalize\nimport matplotlib.pyplot as plt\nimport seaborn as sns\ncolor = sns.color_palette()\n\n%matplotlib inline\n\nfrom plotly import tools\nimport plotly.offline as py\npy.init_notebook_mode(connected=True)\nimport plotly.graph_objs as go\n\nfrom sklearn import model_selection, preprocessing, metrics\nimport lightgbm as lgb\n\npd.options.mode.chained_assignment = None\npd.options.display.max_columns = 999\n\n# Input data files are available in the \"../input/\" directory.\n# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory\n\nprint(os.listdir(\"../input\"))\n\n# Any results you write to the current directory are saved as output.","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"6fe9d5b2a9a7245cc833ce5b2d8fed0daf200fcf"},"cell_type":"code","source":"!ls ../input/","execution_count":null,"outputs":[]},{"metadata":{"_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","trusted":true},"cell_type":"code","source":"hist_trans=pd.read_csv('../input/historical_transactions.csv')\nmerchants=pd.read_csv('../input/merchants.csv')\nnew_merchant_transactions=pd.read_csv('../input/new_merchant_transactions.csv')\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"50dbc1a25fdb17773d67ccb22eb47fa1b994acf6"},"cell_type":"code","source":"train_df=pd.read_csv('../input/train.csv',parse_dates=[\"first_active_month\"])\ntest_df=pd.read_csv('../input/test.csv',parse_dates=['first_active_month'])\n\nprint('Number of rows and columns : ',train_df.shape)\nprint('Number of rows and columns : ',test_df.shape)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"5862743ab48f6d5f19b37145d5ffc92a10a01c40"},"cell_type":"code","source":"train_df.head()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"1d0bf9a4dbe274565a67ed03179d667dd1d283a7"},"cell_type":"markdown","source":"Lets understand how target column for given dataset"},{"metadata":{"trusted":true,"_uuid":"c3a25eed2b8c739414d740ca580dca3a87395b69"},"cell_type":"code","source":"target_col = \"target\"\n\nplt.scatter(range(train_df.shape[0]),np.sort(train_df.target.values))\n\nplt.xlabel(\"Index\",fontsize=12)\nplt.ylabel(\"LoyalityScore\",fontsize=12)\n\nplt.show()\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"35086ee478faa96ddaa250efe48f8a94291f9855"},"cell_type":"code","source":"plt.figure(figsize=(8,8))\nplt.hist(train_df.target.values,bins=50,color='red')\n\nplt.title(\"Histogram of Loyalty score\")\nplt.xlabel('Loyalty score', fontsize=12)\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"9f10544da0a839d409aa3959cc5f67a94b035f2c"},"cell_type":"code","source":"(train_df.target.values < -30).sum()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"602d95fc9ba2dd0e29432a0aeb9e063f783d4385"},"cell_type":"markdown","source":"We can notice some extreme outlier compare to actual Loyality score, its close to 1% of acutal data . "},{"metadata":{"_uuid":"4e00ede33f8c74b48e1ba8d99d407a89df9ce04b"},"cell_type":"markdown","source":"Lets look at how "},{"metadata":{"trusted":true,"_uuid":"d680ce29dcb9fc0f828553f612e43992d7980c09"},"cell_type":"code","source":"cnt_srs = train_df['first_active_month'].dt.date.value_counts()\ncnt_srs = cnt_srs.sort_index()\nplt.figure(figsize=(14,6))\nsns.barplot(cnt_srs.index, cnt_srs.values, alpha=0.8, color='green')\nplt.xticks(rotation='vertical')\nplt.xlabel('First active month', fontsize=12)\nplt.ylabel('Number of cards', fontsize=12)\nplt.title(\"First active month count in train set\")\nplt.show()\n\ncnt_srs = test_df['first_active_month'].dt.date.value_counts()\ncnt_srs = cnt_srs.sort_index()\nplt.figure(figsize=(14,6))\nsns.barplot(cnt_srs.index, cnt_srs.values, alpha=0.8, color='green')\nplt.xticks(rotation='vertical')\nplt.xlabel('First active month', fontsize=12)\nplt.ylabel('Number of cards', fontsize=12)\nplt.title(\"First active month count in test set\")\nplt.show()\n\n\n\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"c2e448f38798b11036b4e278db2b9c6dc7d2b313"},"cell_type":"code","source":"sns.violinplot(x='feature_1',y=train_df.target.values,data=train_df)\nplt.xlabel('Feature 1', fontsize=12)\nplt.ylabel('Loyalty score', fontsize=12)\nplt.title(\"Feature 1 distribution\")\nplt.show()\n\nsns.violinplot(x='feature_2',y=train_df.target.values,data=train_df)\nplt.xlabel('Feature 2', fontsize=12)\nplt.ylabel('Loyalty score', fontsize=12)\nplt.title(\"Feature 2 distribution\")\nplt.show()\n\nsns.violinplot(x='feature_3',y=train_df.target.values,data=train_df)\nplt.xlabel('Feature 3', fontsize=12)\nplt.ylabel('Loyalty score', fontsize=12)\nplt.title(\"Feature 3 distribution\")\nplt.show()\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"e6d3c343a3c4ec5fcbb651ea1a84705aa03b3b02"},"cell_type":"markdown","source":"Not much difference in there distribution of traing and testing data."},{"metadata":{"_uuid":"41d3e2152bc32404a29ba221d38cb28f6e32fef3"},"cell_type":"markdown","source":"**Finding missing values from Train and Test**"},{"metadata":{"trusted":true,"_uuid":"357d27617b83326b0042585e5c195e9cad474181"},"cell_type":"code","source":"#Train Missing Values\ntotal=train_df.isnull().sum().sort_values(ascending = False)\npercentage=(train_df.isnull().sum()/train_df.isnull().count()*100).sort_values(ascending=False)\n\nmissing_data=pd.concat([total,percentage],axis=1,keys=['Total','Percentage'])\nmissing_data.head(10)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"03a60409624514d564d11090d9a6a021344f156c"},"cell_type":"code","source":"#Test missing values\ntotal=test_df.isnull().sum().sort_values(ascending = False)\npercentage=(test_df.isnull().sum()/train_df.isnull().count()*100).sort_values(ascending=False)\n\nmissing_data=pd.concat([total,percentage],axis=1,keys=['Total','Percentage'])\nmissing_data.head(10)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"4fdf15c2a6a7fa29a316662ec98498c5789f228c"},"cell_type":"code","source":"import datetime","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"1a01d53899bfea371121aa3baf1cb56b39c9f593"},"cell_type":"code","source":"import datetime\n\nfor df in [train_df,test_df]:\n    df['first_active_month']=pd.to_datetime(df['first_active_month'])\n    df['year']=df['first_active_month'].dt.year\n    df['month']=df['first_active_month'].dt.month\n    \n    df['elapsed_time']=(datetime.date(2018,2,1)-df['first_active_month'].dt.date).dt.days\n\ntarget=train_df[target_col]\ndel train_df['target']\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"20a6fc8853fab04acbcd74bebdec971e6465159a"},"cell_type":"code","source":"train_df.head()","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"ff75d866567ac94114343b942435eb4ccbaefd60"},"cell_type":"markdown","source":"**Simple Exploration: Historical Transactions**"},{"metadata":{"trusted":true,"_uuid":"ffb944fb01e450c52bd4f5db54e80b8298ac67ce"},"cell_type":"code","source":"hist_trans.head()\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"57fb7bcf8182d63a2706300132bc7e71953885b5"},"cell_type":"code","source":"print(hist_trans.shape)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"9d56cfd9ddd856e45d2d440502d5e18d9c4e211f"},"cell_type":"markdown","source":"* card_id : Card identifier\n* month_lag : month lag to reference date\n* purchase_date : Purchase date\n* authorized_flag : Y' if approved, 'N' if denied\n* category_3 : anonymized category\n* installments : number of installments of purchase\n* category_1 : anonymized category\n* merchant_category_id : Merchant category identifier (anonymized )\n* subsector_id : Merchant category group identifier (anonymized )\n* merchant_id : Merchant identifier (anonymized)\n* purchase_amount : Normalized purchase amount\n* city_id : City identifier (anonymized )\n* state_id : State identifier (anonymized )\n* category_2 : anonymized category"},{"metadata":{"trusted":true,"_uuid":"6bd5d6df1a97b05a900732eb7a8cee85ce0bc008"},"cell_type":"code","source":"hist_trans['authorized_flag']=hist_trans['authorized_flag'].map({'Y':1,'N':0})\n\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"f1dfb193c20ada4fe1288330a335e1fc4aa8f3aa"},"cell_type":"code","source":"hist_trans.loc[:,'purchase_date']=pd.DatetimeIndex(hist_trans['purchase_date']).astype(np.int64)*1e-9\n\n# aggregate function\nagg_func = {\n        'authorized_flag': ['sum', 'mean'],\n        'merchant_id': ['nunique'],\n        'city_id': ['nunique'],\n        'purchase_amount': ['sum', 'median', 'max', 'min', 'std'],\n        'installments': ['sum', 'median', 'max', 'min', 'std'],\n        'purchase_date': [np.ptp],\n        'month_lag': ['min', 'max']\n        }\nagg_histroy=hist_trans.groupby(['card_id']).agg(agg_func)\nagg_histroy.columns=['hist_' + '-'.join(col).strip() for col in agg_histroy.columns.values]\nagg_histroy.reset_index(inplace=True)    ","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"4dd6d08a00d611dcdf26b5ee32c706132c6feea2"},"cell_type":"code","source":"df=agg_histroy.groupby(['card_id']).size().reset_index(name='hist_transactions_count')\nagg_histroy=pd.merge(df,agg_histroy,on='card_id',how='left')\n\nagg_histroy.head(10)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"41e5887eaa2c27dfecb88fc9ee3adae72006e098"},"cell_type":"code","source":"train=pd.merge(train_df,agg_histroy,on='card_id',how='left')\ntest=pd.merge(train_df,agg_histroy,on='card_id',how='left')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"9c66d403a9f1b0f9fb8849af34b8b8fbbdc79c8e"},"cell_type":"code","source":"train.head(10)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"e833cd2e145c128ffb431a5a0fa55d356819d5e7"},"cell_type":"markdown","source":"**Simple Exploration: New_merchants**"},{"metadata":{"trusted":true,"_uuid":"2a9802ec992b5ee2452c4c2d23ae3679d17ee811"},"cell_type":"code","source":"new_merchant_transactions.head(5)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"d24c7f6287aa1a70e23eb7e59af7805d1eb59dbb"},"cell_type":"code","source":"new_merchant_transactions.shape","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"8a9d37b3f57c98ee6569bd21afb94a10545ae63e"},"cell_type":"markdown","source":"* card_id : Card identifier\n* month_lag : month lag to reference date\n* purchase_date : Purchase date\n* authorized_flag : Y' if approved, 'N' if denied\n* category_3 : anonymized category\n* installments : number of installments of purchase\n* category_1 : anonymized category\n* merchant_category_id : Merchant category identifier (anonymized )\n* subsector_id : Merchant category group identifier (anonymized )\n* merchant_id : Merchant identifier (anonymized)\n* purchase_amount : Normalized purchase amount\n* city_id : City identifier (anonymized )\n* state_id : State identifier (anonymized )\n* category_2 : anonymized category"},{"metadata":{"trusted":true,"_uuid":"b36efe70f53069dce672c658a420482eee45393f"},"cell_type":"code","source":"new_merchant_transactions['authorized_flag']=new_merchant_transactions['authorized_flag'].map({'Y':1,'N':0})","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"e449c461fe62f4e0cadd8a0f6757e3d86c65fc6e"},"cell_type":"code","source":"# Finding missing values\n\ntotal=new_merchant_transactions.isnull().sum().sort_values(ascending=False)\npercentage=(new_merchant_transactions.isnull().sum()/new_merchant_transactions.isnull().count() * 100).sort_values(ascending=False)\n\nmissing_data=pd.concat([total,percentage],axis=1,keys=['Total','Percentage'])\n\nmissing_data","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"bfdae80a7fc58b2e8a4aee7b699ce5d4497665e6"},"cell_type":"code","source":"# Making aggregations on New Merchant transactions\n\n# new_merchant_transactions.loc[:,'purchase_date']=pd.DatetimeIndex(new_merchant_transactions['purchase_date']).astype(np.int64)*1e-9\n\n# aggregate function\nnew_agg_func = {\n        'authorized_flag': ['sum', 'mean'],\n        'merchant_id': ['nunique'],\n        'city_id': ['nunique'],\n        'purchase_amount': ['sum', 'median', 'max', 'min', 'std'],\n        'installments': ['sum', 'median', 'max', 'min', 'std'],\n        'month_lag': ['min', 'max']\n        }\nnew_agg_histroy=new_merchant_transactions.groupby(['card_id']).agg(new_agg_func)\n# new_agg_histroy.head(10)\nnew_agg_histroy.columns=['new_' + '-'.join(col1).strip() for col1 in new_agg_histroy.columns.values]\nnew_agg_histroy.reset_index(inplace=True)\nnew_agg_histroy.head(10)\nnew_df=(new_agg_histroy.groupby(['card_id']).size().reset_index(name='new_transactions_count'))\n\nnew_agg_histroy=pd.merge(new_df,new_agg_histroy,on='card_id',how='left')\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"cd097598d828fb32dc13e430c1e44a7b2c45f82d"},"cell_type":"code","source":"new_agg_histroy.head(10)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"8ebff8fdbc49af0350109a86c001a904d683b8bc"},"cell_type":"code","source":"train=pd.merge(train,new_agg_histroy,on='card_id',how='left')\ntest=pd.merge(test,new_agg_histroy,on='card_id',how='left')\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"09e3d6ea6a1b952f0e46df6c662fa6f69dda03fd"},"cell_type":"code","source":"train.shape,test.shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"39ac0cb9647dc3462276347e30af8ac8cc5492d7"},"cell_type":"code","source":"use_col=[col for col in train.columns if col not in ['card_id', 'first_active_month']]","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"073a302238237d703abbb72751f1409accec2203"},"cell_type":"markdown","source":"We have all featured ready , lets go head and try with base model"},{"metadata":{"_uuid":"51402fdddcd56ff0e6d025087ee721ab13ef634d"},"cell_type":"markdown","source":"**Base Model**\n\nkernel : https://www.kaggle.com/youhanlee/hello-elo-ensemble-will-help-you"},{"metadata":{"trusted":true,"_uuid":"744ed9b982d64963c8c6de07ae0fb7d90448df74"},"cell_type":"code","source":"use_col=[col for col in train.columns if col not in ['card_id', 'first_active_month']]\n\n# using below train & test data for our prediction\n\ntrain=train[use_col]\ntest=train[use_col]\n\nfeatures=list(train.columns)\ncategorical_features=[featr for featr in features if 'feature_' in featr]\n\nfor category_col in categorical_features:\n    print(category_col,'********',train[category_col].value_counts().shape[0],'categories')\n    ","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"6c2727326c84fc63a2d4e685212b0701629b20c6"},"cell_type":"markdown","source":"Label Encoding for categorical features"},{"metadata":{"trusted":true,"_uuid":"2b8cf6755d6cd023832eda1adc3485be5c91808b"},"cell_type":"code","source":"from sklearn.preprocessing import LabelEncoder\nfor cat in categorical_features:\n    print(cat)\n    lbe=LabelEncoder()\n    lbe.fit(list(train[cat].values.astype('str')) + list(test[cat].values.astype('str')))\n    train[cat]=lbe.transform(list(train[cat].values.astype('str')))\n    test[cat]=lbe.transform(list(test[cat].values.astype('str')))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"455347409bde36fa91f87097a8a1a419525244d4"},"cell_type":"code","source":"train.shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"a120f03a20eaec1778c798a65e359c28660dad46"},"cell_type":"code","source":"df_all=pd.concat([train,test])\ndf_all=pd.get_dummies(df_all,columns=categorical_features)\n# df_all.head(20)\n\n\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"003db26a86a68cff146c7bdfdc9cf03481302224"},"cell_type":"code","source":"len_train=train.shape[0]\nprint(len_train)\ntrain=df_all[:len_train]\nprint(train.shape)\ntest=df_all[len_train:]\nprint(test.shape)","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"19f907bfe359c7bd058f0a5872d473869e5046eb"},"cell_type":"code","source":"from sklearn.model_selection import KFold\nfrom sklearn.metrics import mean_squared_error\nimport lightgbm as lgb\n\n\nlgb_params = {\"objective\" : \"regression\", \"metric\" : \"rmse\", \n               \"max_depth\": 7, \"min_child_samples\": 20, \n               \"reg_alpha\": 1, \"reg_lambda\": 1,\n               \"num_leaves\" : 64, \"learning_rate\" : 0.005, \n               \"subsample\" : 0.8, \"colsample_bytree\" : 0.8, \n               \"verbosity\": -1}\n\nFOLDs = KFold(n_splits=5, shuffle=True, random_state=1989)\n\noof_lgb = np.zeros(len(train))\npredictions_lgb = np.zeros(len(test))\n\nfeatures_lgb = list(train.columns)\nfeature_importance_df_lgb = pd.DataFrame()\n\nfor fold_, (trn_idx, val_idx) in enumerate(FOLDs.split(train)):\n    trn_data = lgb.Dataset(train.iloc[trn_idx], label=target.iloc[trn_idx])\n    val_data = lgb.Dataset(train.iloc[val_idx], label=target.iloc[val_idx])\n\n    print(\"LGB \" + str(fold_) + \"-\" * 50)\n    num_round = 10000\n    clf = lgb.train(lgb_params, trn_data, num_round, valid_sets = [trn_data, val_data], verbose_eval=1000, early_stopping_rounds = 50)\n    oof_lgb[val_idx] = clf.predict(train.iloc[val_idx], num_iteration=clf.best_iteration)\n\n    fold_importance_df_lgb = pd.DataFrame()\n    fold_importance_df_lgb[\"feature\"] = features_lgb\n    fold_importance_df_lgb[\"importance\"] = clf.feature_importance()\n    fold_importance_df_lgb[\"fold\"] = fold_ + 1\n    feature_importance_df_lgb = pd.concat([feature_importance_df_lgb, fold_importance_df_lgb], axis=0)\n    predictions_lgb += clf.predict(test, num_iteration=clf.best_iteration) / FOLDs.n_splits\n    \n\nprint(np.sqrt(mean_squared_error(oof_lgb, target)))","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"c1045899e15810bc58cb3c9185754ece38c93fee"},"cell_type":"code","source":"cols = (feature_importance_df_lgb[[\"feature\", \"importance\"]]\n        .groupby(\"feature\")\n        .mean()\n        .sort_values(by=\"importance\", ascending=False)[:1000].index)\n\nbest_features = feature_importance_df_lgb.loc[feature_importance_df_lgb.feature.isin(cols)]\n\nplt.figure(figsize=(14,14))\nsns.barplot(x=\"importance\",\n            y=\"feature\",\n            data=best_features.sort_values(by=\"importance\",\n                                           ascending=False))\nplt.title('LightGBM Features (avg over folds)')\nplt.tight_layout()\nplt.savefig('lgbm_importances.png')","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"74dbfd7e4b23a227578afbfa6737dc13852e4df6"},"cell_type":"code","source":"sub_df = pd.read_csv('../input/sample_submission.csv')\nsub_df[\"target\"] = pd.Series(predictions_lgb)\nsub_df.to_csv(\"submission_lgb.csv\", index=False)\n","execution_count":null,"outputs":[]},{"metadata":{"_uuid":"df2b741bb052a84aa9ada33e99387374510d99f0"},"cell_type":"markdown","source":"**More to Come !!!!**"},{"metadata":{"_uuid":"5459e84d2ec77feb30144cd6767775290b63bc2e"},"cell_type":"markdown","source":""},{"metadata":{"_uuid":"9f103063e1d99adcac2bcece515cafe07989d82e"},"cell_type":"markdown","source":""},{"metadata":{"_uuid":"20b114b80302a8ef02352d3b42501b9a5db9b5dd"},"cell_type":"markdown","source":""}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.6.6","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":1}