3. 理解数据类型
in[14]: movie = pd.read_csv('data/movie.csv')
# 各列的类型
in[15]: movie.dtypes
out[15]: color object
director_name object
num_critic_for_reviews float64
duration float64
director_facebook_likes float64
...
title_year float64
actor_2_facebook_likes float64
imdb_score float64
aspect_ratio float64
movie_facebook_likes int64
Length: 28, dtype: object
in[16]: # 显示各类型的数量
movie.get_dtype_counts()
out[16]: float64 13
int64 3
object 12
dtype: int64