pandas字符串运算列在字母前后添加字符

pandas字符串运算列在字母前后添加字符

print(p_table'公式')

p_table'公式' = p_table'公式'.str.replace(r"(a-zA-Z+)", r"p_cell'\\1'", regex=True)
print(p_table'公式')

EUtranReselection

0 selQrxLevMin

1 qrxLevMinOfst

2 selQrxLevMin + qrxLevMinOfst

Name: 公式, dtype: object

0 p_cell'selQrxLevMin'

1 p_cell'qrxLevMinOfst'

2 p_cell'selQrxLevMin' + p_cell'qrxLevMinOfst'

Name: 公式, dtype: object

相关推荐
虎头金猫7 小时前
如何在群晖NAS上通过Docker部署CloudSaver?群晖部署CloudSaver教程|聚合资源搜索并实现远程访问
运维·服务器·网络·python·docker·容器·pandas
Uncommon.2 天前
使用pandas处理csv并转为张量
pytorch·python·深度学习·pandas
STR_Liang4 天前
pandas.read_html 报错FileNotFoundError、OSError Traceback (most recent call last)
pandas
㳺三才人子5 天前
初探 Data Analysis - Matplotlib
python·plotly·pandas·matplotlib
quantdash_cc5 天前
告别自建 Requests/BS4 网页爬虫:基于 QuantDash 搭建零维保的高性能量化行情流水线
开发语言·爬虫·python·pandas·量化·quantdash
菜冻鱼6 天前
Python-sklearn-评估指标
开发语言·人工智能·python·机器学习·numpy·pandas·sklearn
菜冻鱼6 天前
Python-sklearn-模型选择
开发语言·人工智能·python·机器学习·numpy·pandas·sklearn
quantdash_cc6 天前
基于 QuantDash 5 分钟 K 线的网格交易策略参数网格搜索寻优实战
android·开发语言·pandas·量化·quantdash
FBI HackerHarry浩6 天前
Pandas 库中用于分类变量独热编码(One-Hot Encoding)的函数 pd.get_dummies() 函数
开发语言·人工智能·python·pandas
菜冻鱼10 天前
Python-pandas-索引与筛选
开发语言·笔记·python·numpy·pandas·学习方法