Created
September 28, 2022 22:19
-
-
Save lesutton/9085dd03d008c7bed283d2a98a62f339 to your computer and use it in GitHub Desktop.
Series or DataFrame?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
ser1 = pd.Series(list('abcd')) | |
ser2 = pd.Series(np.arange(4)) | |
# <class 'pandas.core.frame.DataFrame'> | |
df = pd.concat([ser1, ser2], axis=1) | |
print(type(df)) | |
# <class 'pandas.core.series.Series'> | |
df = pd.concat([ser1, ser2], axis=0) | |
print(type(df)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment