Published
- 1 min read
create a dataframe with series
The solution for this is noted below
create a dataframe with series
Solution
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)
Try other methods by searching on the site. That is if this doesn’t work