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

Creation using a scalar value

A Series can also be created using a scalar value:

This seems like a degenerate case with the Series only having a single value. There are, however, scenarios where this is important, such as when a series is multiplied by a scalar value, like so:

Underneath the covers, pandas took the value 2 and created a Series from that scalar value with a matching index to that in s, and then performed the multiplication through alignment of the two Series. We will look at this example again in more detail later in the chapter.

主站蜘蛛池模板: 望城县| 天气| 故城县| 松桃| 武鸣县| 剑川县| 饶阳县| 长汀县| 定结县| 德格县| 五常市| 平陆县| 安吉县| 宜章县| 庐江县| 和田市| 友谊县| 陈巴尔虎旗| 新田县| 虹口区| 车致| 抚顺市| 华容县| 浦城县| 托克逊县| 榆中县| 福贡县| 林州市| 新乐市| 城固县| 疏附县| 恩平市| 东光县| 白玉县| 铜陵市| 金昌市| 尚义县| 无棣县| 隆子县| 长阳| 永泰县|