combine two Dataframes through pandas

Viewed 35

the question is a little bit confused....Maybe my english is not good.

1.The data file for the second school is ms_data.csv. Load the data like you loaded the first data file. Then, create a new DataFrame that is a combination of the first two.

df = pd.read_csv('gp_data.csv',sep= ";",index_col= "student_id")

df1 = pd.read_csv('ms_data.csv')

2.Using concat, combine the first and last five rows of the DataFrame. Print the result.

df_row_concat = pd.concat([df, df1])
print(df_row_conca).head(0)
print(df_row_conca).tail(5)

My question is. what is the mean of "first two"?????

0 Answers
Related