Skip to Content
Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習
book

Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

by Jake VanderPlas, 菊池 彰
May 2018
Intermediate to advanced
556 pages
13h 21m
Japanese
O'Reilly Japan, Inc.
Content preview from Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習
192
3
章 
pandas
を使ったデータ操作
最後に、
datetime64
データ型は、組み込みの
Python
datetime
型の欠点に対応していますが、
datetime
型、特に
dateutil
によって提供される有益なメソッドの多くは提供されていません。詳
は、
NumPy
datetime64
ト(
http://docs.scipy.org/doc/numpy/reference/arrays.
datetime.html
)を参照してください。
3.12.1.3
pandas
の日付と時刻:両者のいいとこ取り
pandas
は、
numpy.datetime64
のコンパクトなデータ表現とベクトル化されたインターフェース
に、
datetime
dateutil
の使いやすさと組み合わせた
Timestamp
オブジェクトを提供し、これま
でに説明したすべての機能を実現しています。これらの
Timestamp
オブジェクトのグループから、
Series
または
DataFrame
のインデクスに使用できる
DatetimeIndex
を作成できます。そうした例を、
以下に示します。
例えば、
pandas
の機能を使用して先のデモと同じコードを作ります。さまざまなフォーマット
の日付文字列を解析し、フォーマットコードを使用して曜日を出力します。
In[9]: import pandas as pd
date = pd.to_datetime("4th of July, 2015")
date
Out[9]: Timestamp('2015-07-04 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Jake VanderPlas, 菊池 彰
初めてのGraphQL ―Webサービスを作って学ぶ新世代API

初めてのGraphQL ―Webサービスを作って学ぶ新世代API

Eve Porcello, Alex Banks, 尾崎 沙耶, あんどうやすし

Publisher Resources

ISBN: 9784873118413Other