我有一个pd系列,
s = pd.Series([1, 2, 3, np.nan])
当我做,
s.map('this is a string {}'.format)
[out]
0 this is a string 1.0
1 this is a string 2.0
2 this is a string 3.0
3 this is a string nan
如何使用格式化字符串获得相同的结果?
s.map(f'this is a string {?}') ?
FFIVE
守候你守候我
相关分类