image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

import numpy as np
import pandas as pd
pd.set_option('display.max_columns', 50)
import os
from scipy import stats
import matplotlib.pyplot as plt
import seaborn as sns

TRAIN_PATH = '/kaggle/input/hr-analytics-job-change-of-data-scientists/aug_train.csv'
TEST_PATH = '/kaggle/input/hr-analytics-job-change-of-data-scientists/aug_test.csv'

df = pd.read_csv(TRAIN_PATH)

print(f"Dataset has {len(df['city'].dropna().unique())} unique cities.")
print('_' * 20)
print(f"Unique cities count:\n{df['city'].value_counts()}")
print('*' * 50, end='\n\n')
fig, ax = plt.subplots(figsize=(12, 6))
sns.barplot(ax=ax, x=df['city'].value_counts().index[:10], y=df['city'].value_counts().values[:10], capsize=0.2, palette='Blues_d')