- 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.
推薦閱讀
- UNIX編程藝術
- Java語言程序設計
- UML+OOPC嵌入式C語言開發精講
- Learn Programming in Python with Cody Jackson
- Nexus規模化Scrum框架
- Python機器學習算法與實戰
- Clojure Reactive Programming
- Java EE核心技術與應用
- iOS開發實戰:從入門到上架App Store(第2版) (移動開發叢書)
- 速學Python:程序設計從入門到進階
- Instant Debian:Build a Web Server
- Angular應用程序開發指南
- Webpack實戰:入門、進階與調優(第2版)
- SCRATCH編程課:我的游戲我做主
- Pandas入門與實戰應用:基于Python的數據分析與處理