如何查询你的Pandas数据帧?

复制print(“Percent of data who are Males OR were born between 2010 and 2021:”,何查 100*round(df[(df[‘Gender’] == ‘M’) | (df[‘Birthdate’] >= ‘2010–01–01’) & (df[‘Birthdate’] <= ‘2021–01–01’)][‘Gender’].count()/df.shape [0],4), “%”) 1.2.3.4.
本文地址:http://www.bzuk.cn/html/66f7299861.html
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。