Py学习  »  Python

如何将列表列表添加到Python上特定列的df中?熊猫相关

NoahVerner • 3 年前 • 1343 次点击  

假设我有以下几点 df Volatility expected 专栏:

Index Time   Currency   Volatility expected Event                                 Actual    Forecast    Previous
0     02:00    GBP                          U.K. Construction Output (YoY) (Jan)  9.9%      9.2%        7.4%
1     02:00    GBP                          Construction Output (MoM) (Jan)       1.1%      0.5%        2.0%
2     02:00    GBP                          GDP (MoM)                             0.8%      0.2%       -0.2%
3     02:00    GBP                          GDP (YoY)                             10.0%     9.3%        6.0%
                                                                                                 

下面的列表称为 volatility_list :

 volatility_list = [
                   ['Low Volatility Expected'],
                   ['Low Volatility Expected'],
                   ['High Volatility Expected'],
                   ['High Volatility Expected'],
                   ]

我该怎么补充呢 易变性列表 价值观 预期波动性 来自 df 结果是这样的?

Index Time   Currency   Volatility expected      Event                                Actual Forecast  Previous
0     02:00    GBP      Low Volatility Expected  U.K. Construction Output (YoY) (Jan)  9.9%     9.2%     7.4%
1     02:00    GBP      Low Volatility Expected  Construction Output (MoM) (Jan)       1.1%     0.5%     2.0%
2     02:00    GBP      High Volatility Expected GDP (MoM)                             0.8%     0.2%    -0.2%
3     02:00    GBP      High Volatility Expected GDP (YoY)                             10.0%    9.3%     6.0%
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/128543
 
1343 次点击  
文章 [ 2 ]  |  最新文章 3 年前