- 博客(4)
- 收藏
- 关注
原创 Datawhale-Pandas-Task03-索引【更新中】
索引在pandas中是非常重要的概念,但在R中这个概念就很弱,甚至在R的DataFrame中尽量避免使用行名。 索引器 Series的索引 R没有类似的功能 # Python s = pd.Series([1, 2, 3, 4, 5, 6], index=['a', 'b', 'a', 'a', 'a', 'c']) s['a'] s[['a', 'b']] # Python s = pd.Series(['a', 'b', 'c', 'd', 'e', 'f'], index=[1, 3, 1, 2,
2020-12-22 23:55:54 107
原创 Datawhale-Pandas-Task02-Pandas基础
格式 Python读 Python写 R读 R写 CSV pd.read_csv pd.to_csv read.csv data.table::fread write.csv TXT pd.read_table pd.to_csv read.table write.table Fixed-Width Text File pd.read_fwf NA read.fwf NA MS Excel pd.read_excel pd.to_excel readxl::read_...
2020-12-19 23:42:02 196
原创 Datawhale-Pandas-Task01-预备知识
Numpy基础 # Python import numpy as np mat = np.zeros((2, 3)) mat.T np.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允许有一个维度为空,但需要填充-1 target
2020-12-16 23:06:45 174 2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人