i found a way to concatenate my pandas data frames in a dictionary.
Que; how can i use the dictionary keys as first column in the final dataframe?
i tried but thar didn’t work
<code>pd.concat(test_list.values(), ignore_index=False, keys= test_list.keys())
</code>
<code>pd.concat(test_list.values(), ignore_index=False, keys= test_list.keys())
</code>
pd.concat(test_list.values(), ignore_index=False, keys= test_list.keys())
data
<code>test_list = {'ENSMUSG00000025333.10': treatment_code subjectCode fraction_modified_entropy_in_log2 log_RPKM
59478 0 2 1.822939 3.109444
107087 1 4 0.811278 3.476707, 'ENSMUSG00000025903.14': treatment_code subjectCode fraction_modified_entropy_in_log2 log_RPKM
178498 0 1 1.000000 3.175110
107116 1 3 3.551271 3.002025, 'ENSMUSG00000063663.11': treatment_code subjectCode fraction_modified_entropy_in_log2 log_RPKM
59417 0 2 2.755851 1.07040
118918 1 3 3.088372 1.19147}
</code>
<code>test_list = {'ENSMUSG00000025333.10': treatment_code subjectCode fraction_modified_entropy_in_log2 log_RPKM
59478 0 2 1.822939 3.109444
107087 1 4 0.811278 3.476707, 'ENSMUSG00000025903.14': treatment_code subjectCode fraction_modified_entropy_in_log2 log_RPKM
178498 0 1 1.000000 3.175110
107116 1 3 3.551271 3.002025, 'ENSMUSG00000063663.11': treatment_code subjectCode fraction_modified_entropy_in_log2 log_RPKM
59417 0 2 2.755851 1.07040
118918 1 3 3.088372 1.19147}
</code>
test_list = {'ENSMUSG00000025333.10': treatment_code subjectCode fraction_modified_entropy_in_log2 log_RPKM
59478 0 2 1.822939 3.109444
107087 1 4 0.811278 3.476707, 'ENSMUSG00000025903.14': treatment_code subjectCode fraction_modified_entropy_in_log2 log_RPKM
178498 0 1 1.000000 3.175110
107116 1 3 3.551271 3.002025, 'ENSMUSG00000063663.11': treatment_code subjectCode fraction_modified_entropy_in_log2 log_RPKM
59417 0 2 2.755851 1.07040
118918 1 3 3.088372 1.19147}