VSCode信息:
In [356]: Truth = pd.to_numeric(df.a.str.contains('None') == False).cumsum()
...:
In [357]: df.groupby(Truth)['b'].agg(list)
Out[357]:
a
0 [we,are the world]
1 [we]
2 [love,the]
3 [world]
4 [so]
5 [much,and]
6 [dance,every]
7 [day,yeah]
Name: b,dtype: object
Python扩展信息:
.this
VSCode不显示使用Version: 1.41.1 (system setup)
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T14:58:56.166Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18363
的通知窗口。