MisterLee's recent timeline updates
MisterLee

MisterLee

2006年美国《时代周刊》年度风云人物
V2EX member #472680, joined on 2020-02-27 11:38:36 +08:00
MisterLee's recent replies
df_1 = df.groupby('A').apply(lambda x: x.sort_values('B')).reset_index(drop = True)
for item in df_1['A'].unique():
df_2 = df_1[df_1['A'] == item]
df_2.to_xxx #导出
——Python&Pandas

a_df= pd.DataFrame(a_list)
b_df= pd.DataFrame(b_list)

a_b_df = pd.concat([a_df, b_df], axis=0).drop_duplicates(['型号', '重量', '审核人'], keep='first')

c_list = []

for _, item in a_b_df.iterrows():
c_list.append(item.dropna().to_dict())
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1510 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 16:44 · PVG 00:44 · LAX 09:44 · JFK 12:44
♥ Do have faith in what you're doing.