Я строю два фрейма данных, но они наносятся друг на друга.Как мне построить их один за другим.я хочу, чтобы ось х сказала dataframe1, dataframe2.и выше этой оси соответствующие участки.Ниже мой код и графики
import pandas as pd
import numpy as np
new_dataframe = pd.read_hdf(r"C:\hd files of pa\datafile1")
dataframe_with_size = pd.read_hdf(r"Y:\forsiye\New Text Document.txt.hd5")
sizes = dataframe_with_size.loc[dataframe_with_size.loc[:, "size"] != 0, "size"].values
random = np.random.RandomState(seed=1)
new_dataframe['size'] = random.choice(
sizes,
size=new_dataframe.shape[0],
replace=True
)
new_dataframe1 = pd.read_hdf(r"C:\hd files of pa\datafile2")
dataframe_with_size1 = pd.read_hdf(r"Y:\forsiye\New Text Document.txt.hd5")
sizes = dataframe_with_size1.loc[dataframe_with_size1.loc[:, "size"] != 0, "size"].values
[![enter image description here][1]][1]
random = np.random.RandomState(seed=1)
new_dataframe1['size'] = random.choice(
sizes,
size=new_dataframe1.shape[0],
replace=True
)
new_dataframe['size'].hist(bins = 300)
new_dataframe1['size'].hist(bins = 300)