擅长:python、mysql、java
<p>使用<code>itertools.chain</code></p>
<p><strong>例如:</strong></p>
<pre><code>import pandas as pd
from itertools import chain
Attribute = [['VDM:1', 'VDM:2', 'VDM:3', 'VDM:4', 'VDM:5'], ['MDM:1', 'MDM:2', 'MDM:3', 'MDM:4', 'MDM:5'], ['OM:1', 'OM:2', 'OM:3', 'OM:4', 'OM:5']]
Support = [[9, 2, 0, 0, 1], [2, 6, 0, 3, 1], [2, 6, 0, 3, 1]]
df= pd.DataFrame({"Attribute:Value": list(chain.from_iterable(Attribute)), "Support": list(chain.from_iterable(Support))})
print(df)
</code></pre>
<p><strong>输出:</strong></p>
<pre><code> Attribute:Value Support
0 VDM:1 9
1 VDM:2 2
2 VDM:3 0
3 VDM:4 0
4 VDM:5 1
5 MDM:1 2
6 MDM:2 6
7 MDM:3 0
8 MDM:4 3
9 MDM:5 1
10 OM:1 2
11 OM:2 6
12 OM:3 0
13 OM:4 3
14 OM:5 1
</code></pre>