首页 技术 正文
技术 2022年11月15日
0 收藏 450 点赞 4,119 浏览 676 个字

无论是数据分析还是机器学习,数据的预处理必不可少。

其中最常用、最基础的Python库非numpy和pandas莫属,很多初学者可能看了很多教程,但是很快就把用法忘光了。

光看不练假把式,今天向大家推荐三套感觉不错的练习题,感兴趣的同学可以练练手。

每套题都分四个Level的难度

Difficulty Level: L1Q. Extract all odd numbers from arrInput:arr = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
Desired output:#> array([1, 3, 5, 7, 9])

答案是隐藏的,点开Solution即可查看

# Input
arr = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])# Solution
arr[arr % 2 == 1]
#> array([1, 3, 5, 7, 9])

Numpy 练习题

https://www.machinelearningplus.com/python/101-numpy-exercises-python/

Pandas 练习题

https://www.machinelearningplus.com/python/101-pandas-exercises-python/

datatable 练习题

  • 工具包 datatable 的功能特征与 Pandas 非常类似,但更侧重于速度以及对大数据的支持。

https://www.machinelearningplus.com/data-manipulation/101-python-datatable-exercises-pydatatable/

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,956
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,480
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,327
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,110
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,741
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,776