Python描述性统计、偏度与峰度、均匀分布、正态分布、二项分布、几何分布、泊松分布、指数分布

关注微信号:小程在线

关注CSDN博客:程志伟的博客

Python描述性统计、偏度与峰度、均匀分布、正态分布、二项分布、几何分布、泊松分布、指数分布
Type "copyright", "credits" or "license" for more information.

IPython 7.6.1 -- An enhanced Interactive Python.

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline

#导入新的数据

mtcars=pd.read_csv('H:/0date/mtcars.csv')
mtcars.head()
Out[2]: 
                name   mpg  cyl   disp   hp  ...   qsec  vs  am  gear  carb
0          Mazda RX4  21.0    6  160.0  110  ...  16.46   0   1     4     4
1      Mazda RX4 Wag  21.0    6  160.0  110  ...  17.02   0   1     4     4
2         Datsun 710  22.8    4  108.0   93  ...  18.61   1   1     4     1
3     Hornet 4 Drive  21.4    6  258.0  110  ...  19.44   1   0     3     1
4  Hornet Sportabout  18.7    8  360.0  175  ...  17.02   0   0     3     2

[5 rows x 12 columns]

#将name列作为索引列

mtcars.set_i

猜你喜欢

转载自blog.csdn.net/c1z2w3456789/article/details/104380778