2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

idlのsaveで作ったfileをpythonで読み込む

Posted at

idlのsaveで変数や配列を保存したtest.savファイルをpythonで読み込む。

import scipy.io as sio
filename = 'test.sav'
df = sio.readsav(filename)

data.keys()と打つと下のようにキーの一覧が表示される。

In [5]: df.keys()
Out[5]: dict_keys(['x', 'y'])

キーを指定すると、

In [7]: df['x']
Out[7]: array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7., 8.,  9.], dtype=float32)
2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?