0
0

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 3 years have passed since last update.

スライス

Last updated at Posted at 2020-10-03

#':'
':'を用いいてスライス(slice)表記が可能である。aを配列とするとa[i:j:k]は、第i番目の要素からj-1番目の要素まで、k-1飛ばしの部分配列という意味になる。i,j,kは省略可能で、iの既定値は0,jの既定値はnp.alen(a)つまりaの0軸に沿った長さ、kの既定値は1である。

[:4]

Pandasで0から3番目までのカラム名を取り出す
features = df.columns[:4]

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?