I have two dataframes that I feed as input to two heatmap functions in seaborn
df1_data =
{'0': {'TPUs': 0.0, 'GPUs': 0.0, 'None': 0.0, 'Other': 0.0}, '1-99': {'TPUs': 1.0434782608695652, 'GPUs': 9.18840579710145, 'None': 7.797101449275362, 'Other': 0.8840579710144928}, '100-999': {'TPUs': 1.9855072463768115, 'GPUs': 13.27536231884058, 'None': 10.115942028985508, 'Other': 0.855072463768116}, '1000-9,999': {'TPUs': 2.0434782608695654, 'GPUs': 15.173913043478262, 'None': 9.681159420289855, 'Other': 0.782608695652174}, '10,000-99,999': {'TPUs': 1.0579710144927537, 'GPUs': 8.391304347826088, 'None': 6.449275362318841, 'Other': 0.3188405797101449}, '100,000 or more': {'TPUs': 0.8260869565217391, 'GPUs': 5.27536231884058, 'None': 4.478260869565218, 'Other': 0.37681159420289856}}
df2_data =
Other 0.0 0.884058 0.855072 0.782609 0.318841 0.376812
{'0': {'TPUs': 0.0, 'GPUs': 0.0, 'None': 0.0, 'Other': 0.0}, '1-99': {'TPUs': 0.09596928982725528, 'GPUs': 1.9193857965451055, 'None': 7.1017274472168905, 'Other': 0.09596928982725528}, '100-999': {'TPUs': 1.055662188099808, 'GPUs': 7.9654510556621885, 'None': 9.692898272552783, 'Other': 0.19193857965451055}, '1000-9,999': {'TPUs': 1.2476007677543186, 'GPUs': 12.667946257197697, 'None': 12.380038387715931, 'Other': 0.4798464491362764}, '10,000-99,999': {'TPUs': 1.055662188099808, 'GPUs': 8.925143953934741, 'None': 10.844529750479847, 'Other': 0.28790786948176583}, '100,000 or more': {'TPUs': 1.8234165067178503, 'GPUs': 10.652591170825335, 'None': 10.652591170825335, 'Other': 0.8637236084452975}}
print(df1)
Q25 0 1-99 100-999 1000-9,999 10,000-99,999 100,000 or more
Q12
TPUs 0.0 1.043478 1.985507 2.043478 1.057971 0.826087
GPUs 0.0 9.188406 13.275362 15.173913 8.391304 5.275362
None 0.0 7.797101 10.115942 9.681159 6.449275 4.478261
Other 0.0 0.884058 0.855072 0.782609 0.318841 0.376812
print(df2)
Q25 0 1-99 100-999 1000-9,999 10,000-99,999 100,000 or more
Q12
TPUs 0.0 0.095969 1.055662 1.247601 1.055662 1.823417
GPUs 0.0 1.919386 7.965451 12.667946 8.925144 10.652591
None 0.0 7.101727 9.692898 12.380038 10.844530 10.652591
Other 0.0 0.095969 0.191939 0.479846 0.287908 0.863724
Using these two dataframes, I am able to generate two different heatmaps, like,
Is it possible combine these two heatmaps into a single heatmap in a triangular format where the upper triangle represents df1 and the lower triangle represents df2 with the same color scale.
It would be great if the plots were made using seaborn