当前位置:网站首页>Classification (data consolidation and grouping aggregation)
Classification (data consolidation and grouping aggregation)
2022-07-03 10:38:00 【weixin_ forty-three million six hundred and ninety-one thousand】
First read in the data ,
Ideas : Reconstruct an all 0 Array of , The column name is classification , If a classification appears in a piece of data , let 0 Turn into 1
List of statistical classifications df['Genre"].str.split(',').tolist()
df.join()# Merge data with the same index ,
Data consolidation .
Merge row indexes .join(index)
Column index for merging merge(coloms)
df3=pd.DatsFrame(np.zeros(3,3)),columns=list("fax"))
df1.merge(df3,on="a") according to a Column index for operation
merge Combine
df3.loc[1,"a"]=1

merge outer Combine nan completion
merge left On the left nan completion
merge right On the right ,nan completion
Data packet aggregation :df.groupby()
DataFrameGroupby It can be traversed
Index and composite index
Index methods and properties print(grouped1.index)
df.index=['x','y']
df1.reindex['a','f']# To reset index
df.set_index("a")# Specify a column as an index
df.set_index("a”,unique)
matplotlib Map the top 10% of the total number of stores in the country
Prepare the data df.hroupby=(by=Country').count().sort_values(ascending=False)[:10])
_x=data1.index()
边栏推荐
- Adaptive Propagation Graph Convolutional Network
- Common scenarios in which Seata distributed transactions fail and do not take effect (transactions do not rollback)
- 多层感知机(PyTorch)
- Stroke prediction: Bayesian
- Leetcode skimming ---263
- 2018 Lenovo y7000 black apple external display scheme
- Realize an online examination system from zero
- Preliminary knowledge of Neural Network Introduction (pytorch)
- Content type ‘application/x-www-form-urlencoded; charset=UTF-8‘ not supported
- 安装yolov3(Anaconda)
猜你喜欢

Preliminary knowledge of Neural Network Introduction (pytorch)

6、 Data definition language of MySQL (1)

Knowledge map reasoning -- hybrid neural network and distributed representation reasoning

Hands on deep learning pytorch version exercise solution - 2.5 automatic differentiation

2018 y7000 upgrade hard disk + migrate and upgrade black apple

Secure in mysql8.0 under Windows_ file_ Priv is null solution

Raspberry pie 4B installs yolov5 to achieve real-time target detection

Weight decay (pytorch)

Class-Variant Margin Normalized Softmax Loss for Deep Face Recognition

多层感知机(PyTorch)
随机推荐
Policy gradient Method of Deep Reinforcement learning (Part One)
神经网络入门之矩阵计算(Pytorch)
Leetcode skimming ---189
Stroke prediction: Bayesian
Leetcode刷题---374
多层感知机(PyTorch)
High imitation wechat
ThreadLocal原理及使用场景
Ut2014 supplementary learning notes
A super cool background permission management system
A complete answer sheet recognition system
Content type ‘application/x-www-form-urlencoded;charset=UTF-8‘ not supported
SQL Server Management Studio cannot be opened
Are there any other high imitation projects
Weight decay (pytorch)
Leetcode刷题---1385
Leetcode skimming ---367
High imitation bosom friend manke comic app
ECMAScript -- "ES6 syntax specification # Day1
Hands on deep learning pytorch version exercise solution - 2.4 calculus