【发布时间】:2022-11-02 03:12:10
【问题描述】:
我有一个像这样的数据框:
| Store | matches |
|---|---|
| Murphy's | [{'domain': 'murphyscolumbus.com', 'location': 'Columbus, OH'}, {'domain': 'murphystampa.com', 'location': 'Tampa, FL'}] |
| Bill's | [{'domain': 'billsdallas.com', 'location': 'Dallas, TX'}, {'domain': 'billsorlando.com', 'location': 'Orlando, FL'}] |
我想要的是这样的数据框:
| Store | domains |
|---|---|
| Murphy's | ['murphyscolumbus.com', 'murphystampa.com'] |
| Bill's | ['billsdallas.com','billsorlando.com'] |
我希望在计算上比像 for 循环这样的东西更便宜,因为数据框是逐步通过的相当大的。
【问题讨论】:
标签: python json pandas dataframe