Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Pythonによる標準偏差 | セクション
データ分析のための統計学

bookPythonによる標準偏差

メニューを表示するにはスワイプしてください

最初の関数はnumpyから、2番目のメソッドはpandasから提供されています。work_yearの標準偏差を計算する例を見てみましょう:

123456789101112
import pandas as pd import numpy as np df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/a849660e-ddfa-4033-80a6-94a1b7772e23/update/ds_salaries_statistics', index_col = 0) # Calculate the standard deviation using the function from the NumPy library std_1 = np.std(df['salary_in_usd']) # Calculate the standard deviation using the function from the pandas library std_2 = df['salary_in_usd'].std() print('The standard deviation using NumPy library is', round(std_1, 2)) print('The standard deviation using pandas library is', round(std_2, 2))
copy
question mark

標準偏差を計算する際、numpyのnp.std()とpandasの.std()を使用する主な違いは何ですか?

正しい答えを選んでください

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  17

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 1.  17
some-alt