I use this code to export a dataframe to png, and it works.
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
ar = df.extent.height / df.extent.width
arcpy.mapping.ExportToPNG(mxd,r"C:\Users\Kakemphaton\Desktop\out.png",df,1024,1024*ar,96,True)
Code from: Writing world file when exporting TIFF using ArcPy Mapping?Writing world file when exporting TIFF using ArcPy Mapping?
This code exports only the first dataframe and always the first. I can't export others and I have multiple dataframes in my mxd (example_1, example_2, example_3). How could I export example_2 and example_3? I tried to activate it for example_2, but it always exports example_1.