pd.options.display.max_rows = 8
movie = pd.read_csv('movie.csv')

# 打印行数和列数
movie.shape
#(1000, 12)

# 打印数据的个数
movie.size
#12000

# 该数据集的维度
movie.ndim
#2

# 该数据集的长度
len(movie)
#1000

# 各个列的值的个数
movie.count()
'''
Rank                  1000
Title                 1000
Genre                 1000
Description           1000
                      ... 
Rating                1000
Votes                 1000
Revenue (Millions)     872
Metascore              936
Length: 12, dtype: int64
'''

# 各列的最小值
movie.min()
'''
Rank                                                                  1
Title                                              (500) Days of Summer
Genre                                                            Action
Description           "21" is the fact-based story about six MIT stu...
                                            ...                        
Rating                                                              1.9
Votes                                                                61
Revenue (Millions)                                                    0
Metascore                                                            11
Length: 12, dtype: object
'''

# 打印描述信息
movie.describe()
 RankYearRuntime (Minutes)RatingVotesRevenue (Millions)Metascore
count1000.0000001000.0000001000.0000001000.0000001.000000e+03872.000000936.000000
mean500.5000002012.783000113.1720006.7232001.698083e+0582.95637658.985043
std288.8194363.20596218.8109080.9454291.887626e+05103.25354017.194757
min1.0000002006.00000066.0000001.9000006.100000e+010.00000011.000000
25%250.7500002010.000000100.0000006.2000003.630900e+0413.27000047.000000
50%500.5000002014.000000111.0000006.8000001.107990e+0547.98500059.500000
75%750.2500002016.000000123.0000007.4000002.399098e+05113.71500072.000000
max1000.0000002016.000000191.0000009.0000001.791916e+06936.630000100.000000
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐