101道Numpy、Pandas练习题
2024-08-28 04:12:06
无论是数据分析还是机器学习,数据的预处理必不可少。
其中最常用、最基础的Python库非numpy和pandas莫属,很多初学者可能看了很多教程,但是很快就把用法忘光了。
光看不练假把式,今天向大家推荐三套感觉不错的练习题,感兴趣的同学可以练练手。
每套题都分四个Level的难度
Difficulty Level: L1
Q. Extract all odd numbers from arr
Input:
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/
最新文章
- ABP理论学习之导航(Navigation)
- hibernate 3.3.2GA版的下载
- sprint1的个人总结及《构建之法》8、9、10章读后感
- 强行替换exe图标的方法
- 关于Spring运用过程中jar包报错问题
- 如何做高大上的网站布局 -------------------->;>;转至(卧牛SEO/武汉SEO http://blog.sina.com.cn/zhengkangseo )
- Hash查找法在Keil C51中的实现
- g++ error: expected nested-name-specifier before 'XXX'
- .Net 文本框实现内容提示(仿Google、Baidu)
- Hyperledger Fabric 1.0 从零开始(四)——Fabric源码及镜像文件处理
- void指针和const指针
- Type Archive for required library: 'C:/Users/EuphemiaShaw/.m2/repository/org/apache/hadoop/hadoop-hdfs/2.6.5/hadoop-hdfs-2.6.5.jar' in project 'mapreduce' cannot be read or is not a valid ZIP file
- input表单强制大小写
- IIS6.0+win2003部署MVC网站的一些问题
- 浏览器的userAgent归纳
- 结对第2次作业——WordCount进阶需求
- Golang client绑定本地IP和端口
- 【Anaconda】:科学计算的Python发行版
- 数据库迁移之从oracle 到 MySQL最简单的方法
- JDK 和 JRE 有什么区别
热门文章
- LOJ10163 Amount of Degrees
- ctsc选课
- HarmonyOS三方件开发指南(7)——compress组件
- CSS 文本效果
- 使用 html5 svg 绘制图形
- java HashMap and HashMultimap 区别
- f5 http和tcp_80 monitor
- [ICPC 2018 宁夏邀请赛] A-Maximum Element In A Stack(思维)
- 1151 LCA in a Binary Tree
- Educational Codeforces Round 84 (Div. 2)