- 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.
推薦閱讀
- Instant Zepto.js
- The HTML and CSS Workshop
- C語言程序設計同步訓練與上機指導(第三版)
- Gradle for Android
- Learning Zurb Foundation
- NGINX Cookbook
- Scratch3.0趣味編程動手玩:比賽訓練營
- 零基礎學C語言第2版
- 軟件測試綜合技術
- Android Development Tools for Eclipse
- ASP.NET Web API Security Essentials
- WebStorm Essentials
- Python第三方庫開發應用實戰
- Python Automation Cookbook
- Offer來了:Java面試核心知識點精講(框架篇)