import pandas as pd
import numpy as np

df = pd.DataFrame({'X1': [10,20,30], 'X2': [50,60,70]})

df1 = df.apply(np.sum, axis=0)
df2 = df.apply(np.sum, axis=1)

print("initial dataframe:")
print(df)
print("add values (axis=0):")
print(df1)
print("add values (axis=1):")
print(df2)

