📜  连续选择字母 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:15.506000             🧑  作者: Mango

代码示例1
#creating a new column and segregating the items
df['Item_Identifier_Combined'] = df['Item_Identifier'].apply(lambda x: x[0:2])
df['Item_Identifier_Combined'].value_counts()

output:-
FD    10201
NC     2686
DR     1317
Name: Item_Identifier_Combined, dtype: int64