You can use
If you need to calculate average salaries per industry, you need to look at grouping facilities of pandas, e.g.
Hope that helps...
.iloc
to get specific elements, e.g. in last column of the data frame.df.iloc[1, -1]
will return element in the last column that belongs to the second row (0-based indexing in pandas).If you need to calculate average salaries per industry, you need to look at grouping facilities of pandas, e.g.
df.groupby(['industry'])['salary'].mean()
. This assumes the df has salary
and industry
columns. Hope that helps...