This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
# using Kaggle's famous Titanic Dataset below | |
data = pd.read_csv("train.csv") | |
profile = data.profile_report(title='Titanic Dataset Profile') | |
profile.to_file(output_file="output.html") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
# using Kaggle's famous Titanic Dataset below | |
data = pd.read_csv("train.csv") | |
print(data.describe(include = 'all')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from sklearn.base import TransformerMixin | |
from xgboost import XGBClassifier | |
from sklearn.pipeline import Pipeline | |
from sklearn import metrics | |
class DataTransformer(TransformerMixin): | |
def cabin(self, val): | |
if type(val) != str or val == "": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from sklearn.base import TransformerMixin | |
from xgboost import XGBClassifier | |
from sklearn.pipeline import Pipeline | |
from sklearn import metrics | |
class DataTransformer(TransformerMixin): | |
def fit(self, X, y=None): | |
assert isinstance(X, pd.DataFrame) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.base import TransformerMixin | |
class DataTransformer(TransformerMixin): | |
def fit(self, X, y=None): | |
return self | |
def transform(self, X, y=None): | |
return X |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.base import TransformerMixin | |
class DataTransformer(TransformerMixin): | |
def fit(self, X, y=None): | |
return self | |
def transform(self, X, y=None): | |
return X | |