官术网_书友最值得收藏!

Mathematical operations allowed

At each level, we will describe briefly the type of math that is allowed, and more importantly, not allowed. At this level, we cannot perform any quantitative mathematical operations, such as addition or pision. These would not make any sense. Due to the lack of addition and pision, we obviously cannot find an average value at the nominal level. There is no average name or average job department.

We can, however, do basic counts using pandas' value_counts methods:

# Basic Value Counts of the Grade column
salary_ranges['Grade'].value_counts().head()


00000 61 07450 12 06870 9 07170 9 07420 9 Name: Grade, dtype: int64

The most commonly occurring Grade is 00000, meaning that that is our mode or most commonly occurring category. Because of our ability to count at the nominal level, graphs, like bar charts, are available to us:

# Bar Chart of the Grade column salary_ranges['Grade'].value_counts().sort_values(ascending=False).head(20).plot(kind='bar')

The following is the result of the preceding code:

At the nominal level, we may also utilize pie charts:

# Bar Chart of the Grade column as a pie chart (top 5 values only)
salary_ranges['Grade'].value_counts().sort_values(ascending=False).head(5).plot(kind='pie')

The following is the output of the preceding code:

主站蜘蛛池模板: 大理市| 廉江市| 遵化市| 晋州市| 丰台区| 葫芦岛市| 新邵县| 饶平县| 北海市| 珠海市| 丰都县| 永嘉县| 肇东市| 穆棱市| 栾城县| 拉孜县| 华坪县| 常山县| 仲巴县| 沂源县| 宜兰市| 井研县| 北京市| 义马市| 额敏县| 通城县| 丹巴县| 饶河县| 湄潭县| 濉溪县| 绵竹市| 隆德县| 五河县| 汉川市| 应用必备| 蒙阴县| 东兰县| 清涧县| 大理市| 榆中县| 大姚县|