【发布时间】:2016-06-08 07:21:12
【问题描述】:
我有一个数据框,其中 features-column 的值类似于 dict,如下所示:
http://screencast.com/t/0Ko0NIBLwo
features name price rating read reviews
9 {'Cooking...': '- S...', } Master Chef... $279.99 None None {}
字典示例:
{u'Cooking Type': u'- Specialty Cooking', u'Cooking Area': u'- Backyard', u'Brand Name': u'- Pizzacraft', u'Fuel Type': u'- Propane', u'Product Type': u'- BBQ', u'Size': u'- Medium Size'}
是否可以将这些值转换为新列?
features Cooking Type Specialty Cooking ... name price rating read reviews
9 {'Cooking...': '- S...', } Specialty Cooking Backyard ... Master Chef... $279.99 None None {}
【问题讨论】:
标签: python python-2.7 dictionary pandas