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?

【Python】describeメソッド

Posted at

次のような1年間の日毎の売上データがある場合を考えます。

df = pd.DataFrame(
np.random.randint(100, 1000, 365),
index=pd.date_range('2023-01-01', periods=365),
columns=['売上'])
▶︎
image.png
これにdescribeメソッドを適用すると、「データ件数、算術平均、標本標準偏差、最小値、第1四分位、中央値、第3四分位、最大値」が出力されます。

df.describe()
▶︎
image.png
describeは属性ではなくメソッドのため、「describe()」のように最後に丸カッコが必要です。

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?