LoginSignup
0
2

More than 5 years have passed since last update.

Pandasメモ

Posted at

リサンプル時に補間する

時系列データを伸ばす方向にリサンプルすると補間が行われずにNaNが入る(デフォルト)。
fill_methodオプションで埋めるようにする。

df = pandas.read_csv(f, fill_method='pad')

NaNの行を削除する

df.dropna(how='all', inplace=True)  # inplace=Trueで自己破壊的な処理をする
0
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
0
2