xxxxxxxxxx
import pandas as pd
# Assuming the DataFrame is named df and the column name is 'column_name'
series = df['column_name']
# Printing the resulting Pandas Series
print(series)
xxxxxxxxxx
import pandas as pd
import matplotlib.pyplot as plt
author = ['Jitender', 'Purnima', 'Arpit', 'Jyoti']
article = [210, 211, 114, 178]
auth_series = pd.Series(author)
article_series = pd.Series(article)
frame = { 'Author': auth_series, 'Article': article_series }
result = pd.DataFrame(frame)
xxxxxxxxxx
In [5]: ages = pd.Series([22, 35, 58], name="Age")
In [6]: ages
Out[6]:
0 22
1 35
2 58
Name: Age, dtype: int64