LoginSignup
0
1

More than 5 years have passed since last update.

【Python】pandas.DataFrameをnumpy.ndarrayに変換する

Last updated at Posted at 2016-07-02

pandas.DataFrameをnumpy.ndarrayに変換する方法をいつも忘れるので。

import numpy as np
import pandas as pd

df = pd.DataFrame(np.arange(9).reshape(3, 3))
type(df.values)
出力結果
numpy.ndarray
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1