- 博客(4)
- 收藏
- 关注
原创 Datawhale-Pandas-Task03-索引【更新中】
索引在pandas中是非常重要的概念,但在R中这个概念就很弱,甚至在R的DataFrame中尽量避免使用行名。索引器Series的索引R没有类似的功能# Pythons = pd.Series([1, 2, 3, 4, 5, 6], index=['a', 'b', 'a', 'a', 'a', 'c'])s['a']s[['a', 'b']]# Pythons = pd.Series(['a', 'b', 'c', 'd', 'e', 'f'], index=[1, 3, 1, 2,
2020-12-22 23:55:54
94
原创 Datawhale-Pandas-Task02-Pandas基础
格式Python读Python写R读R写CSVpd.read_csvpd.to_csvread.csvdata.table::freadwrite.csvTXTpd.read_tablepd.to_csvread.tablewrite.tableFixed-Width Text Filepd.read_fwfNAread.fwfNAMS Excelpd.read_excelpd.to_excelreadxl::read_...
2020-12-19 23:42:02
177
原创 Datawhale-Pandas-Task01-预备知识
Numpy基础# Pythonimport numpy as npmat = np.zeros((2, 3))mat.Tnp.r_[np.zeros((2, 3)), np.zeros((2, 3))]np.c_[np.zeros((2, 3)), np.zeros((2, 3))]target = np.arange(8).reshape(2,4)target = np.arange(8).reshape(2,-1) ## reshape允许有一个维度为空,但需要填充-1target
2020-12-16 23:06:45
164
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人