text_plain_output_1.png
import matplotlib.pyplot as plt

import os

import pandas as pd

import warnings

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
plt.style.use('seaborn-whitegrid')
import seaborn as sns
from collections import Counter
import warnings
warnings.filterwarnings('ignore')
import os

train = pd.read_csv('/kaggle/input/titanic/train.csv')
test = pd.read_csv('/kaggle/input/titanic/test.csv')
test_PassengerId = test['PassengerId']

train.columns

def barPlot(feature):
    temp = train[feature]
    tempValue = temp.value_counts()
    plt.xticks(tempValue.index, tempValue.index.values)

category = ['Survived', 'Sex', 'Pclass', 'Embarked', 'SibSp', 'Parch']
for c in category:
    barPlot(c)