擅长:python、mysql、java
<p>看来你需要。在</p>
<pre><code>import pandas as pd
import json
import ast
df = pd.DataFrame({"Unit Id": ["A108", "P258"], "Batch Id": ["qa120", "re015"], "Items prod": ["{'A': 123, 'B': 342, 'C': 454}", "{'A': 124, 'B': 234, 'C': 343}"]})
df["NEW"] = df["Items prod"].apply(ast.literal_eval).apply(json.dumps)
print(df)
</code></pre>
<p><strong>输出:</strong></p>
^{pr2}$