Concatenating Dataframes By Index/columns Elements
import pandas as pd import numpy as np df = pd.DataFrame(data = np.random.random(36).reshape((9,4)), index = np.arange(1, np.random.random(36).reshape((9,4)).shape[0]+1), columns=
Solution 1:
pd.merge(df, te, left_index=True, right_on='Number_test')
or
pd.merge(df.reset_index(), te, left_on='index', right_on='Number_test')
Post a Comment for "Concatenating Dataframes By Index/columns Elements"