BaşlayınÜcretsiz Başlayın

Comparing salaries

Exploratory data analysis is a crucial step in generating hypotheses!

You've had an idea you'd like to explore—do data professionals get paid more in the USA than they do in Great Britain?

You'll need to subset the data by "Employee_Location" and produce a plot displaying the average salary between the two groups.

The salaries DataFrame has been imported as a pandas DataFrame.

pandas has been imported as pd, maplotlib.pyplot as plt and seaborn as sns.

Bu egzersiz

Exploratory Data Analysis in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Filter salaries where "Employee_Location" is "US" or "GB", saving as usa_and_gb.
  • Use usa_and_gb to create a barplot visualizing "Salary_USD" against "Employee_Location".

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Filter for employees in the US or GB
usa_and_gb = salaries[____["____"].____(["____", "____"])]

# Create a barplot of salaries by location
sns.____(data=____, x="____", y="____")
plt.show()
Kodu Düzenle ve Çalıştır