Skip to content

Instantly share code, notes, and snippets.

@karamanbk
Created May 25, 2019 09:04
Show Gist options
  • Save karamanbk/22700e5044b644697f5bf56131cb1d5c to your computer and use it in GitHub Desktop.
Save karamanbk/22700e5044b644697f5bf56131cb1d5c to your computer and use it in GitHub Desktop.
#import libraries
from datetime import datetime, timedelta,date
import pandas as pd
%matplotlib inline
from sklearn.metrics import classification_report,confusion_matrix
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from __future__ import division
from sklearn.cluster import KMeans
import plotly.plotly as py
import plotly.offline as pyoff
import plotly.graph_objs as go
import xgboost as xgb
from sklearn.model_selection import KFold, cross_val_score, train_test_split
#initiate plotly in jupyter notebook
pyoff.init_notebook_mode()
#import the csv
df_data = pd.read_csv('churn_data.csv')
#print first 10 rows
df_data.head(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment