无论是数据分析还是机器学习,数据的预处理必不可少。
其中最常用、最基础的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 练习题
www.machinelearningplus.com/python/101-numpy-exercises-python/
Pandas 练习题
www.machinelearningplus.com/python/101-pandas-exercises-python/
datatable 练习题
- 工具包 datatable 的功能特征与 Pandas 非常类似,但更侧重于速度以及对大数据的支持。
www.machinelearningplus.com/data-manipulation/101-python-datatable-exercises-pydatatable/
點(diǎn)擊查看更多內(nèi)容
為 TA 點(diǎn)贊
評(píng)論
評(píng)論
共同學(xué)習(xí),寫下你的評(píng)論
評(píng)論加載中...
作者其他優(yōu)質(zhì)文章
正在加載中
感謝您的支持,我會(huì)繼續(xù)努力的~
掃碼打賞,你說(shuō)多少就多少
贊賞金額會(huì)直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦