- Learning pandas(Second Edition)
- Michael Heydt
- 99字
- 2021-07-02 20:37:09
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.
推薦閱讀
- Node.js 10實戰
- Learning C# by Developing Games with Unity 2020
- Oracle Database In-Memory(架構與實踐)
- PostgreSQL Cookbook
- 少年輕松趣編程:用Scratch創作自己的小游戲
- INSTANT Sencha Touch
- Java開發入行真功夫
- UI智能化與前端智能化:工程技術、實現方法與編程思想
- Java面向對象程序開發及實戰
- Instant RubyMotion App Development
- C語言程序設計
- Nginx實戰:基于Lua語言的配置、開發與架構詳解
- Linux Shell核心編程指南
- Nagios Core Administration Cookbook(Second Edition)
- Android Game Programming by Example