image_output_1.png
import pandas as pd

import plotly.express as px

import plotly.express as px

train = pd.read_csv('../input/hr-analytics-job-change-of-data-scientists/aug_train.csv')

import plotly.express as px
from plotly.subplots import make_subplots
import plotly.graph_objs as go

cd = train['city_development_index'].value_counts().reset_index()
cd.columns = [
    'city_development_index', 
    'count'
]
cd['city_development_index'] = cd['city_development_index'].astype(str) + '-'
cd = cd.sort_values(['count']).tail(50)

fig = px.bar(
    cd, 
    x='count', 
    y='city_development_index', 
    orientation='h', 
    title='City development index', 
    width=1000,
    height=900 
)

fig.show()

import plotly.express as px
from plotly.subplots import make_subplots
import plotly.graph_objs as go
ep = train['experience'].value_counts().reset_index()
ep.columns = ['experience', 'percent']
ep['percent'] /= len(train)
fig = px.pie(ep, names='experience', values='percent', title='Experience', width=800, height=500)
fig.show()