text_plain_output_1.png
import matplotlib.pyplot as plt

import os

import pandas as pd

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

plt.style.available

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

def bar_plot(variable):
    """
    input: varible exmple: "sex"
    output: bar plot& value count
    """
    var = train_df[variable]
    varValue = var.value_counts()
    plt.xticks(varValue.index, varValue.index.values)

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