Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- upper_df = pd.DataFrame()
- lower_df = pd.DataFrame()
- upper_df["character"] = ["Rachel Green", "Monica Geller", "Phoebe Buffay"]
- upper_df["cast"] = ["Jennifer Aniston", "Courteney Cox", "Lisa Kudrow"]
- lower_df["character"] = ["Joey Tribbiani", "Chandler Bing", "Ross Geller"]
- lower_df["cast"] = ["Matt LeBlanc", "Matthew Perry", "David Schwimmer"]
- print("Upper df:")
- upper_df
- print("Lower df:")
- lower_df
- print("Concatenated vertically using append method:")
- upper_df.append(lower_df)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement