Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

create a dataframe with series

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)
Comment

create series in pandas

ages = pd.Series([22, 35, 58], name="Age")

In [6]: ages
Out[6]: 
0    22
1    35
2    58
Name: Age, dtype: int64
Comment

Creating a Pandas Data Frame Series

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
Comment

pandas series create

import pandas as pd

series = pd.Series()
Comment

PREVIOUS NEXT
Code Example
Python :: make selenium headless python 
Python :: dataframe x y to geodataframe 
Python :: wxpython custom dialog 
Python :: install selenium python mac anaconda 
Python :: pyspark add string to columns name 
Python :: python program to give shop name 
Python :: matplotlib title cilpped off 
Python :: how to print for loop in same line in python 
Python :: get difference of images python 
Python :: python logging to console exqmple 
Python :: matplotlib bold 
Python :: python for i in directory 
Python :: how to sharpen image in python using cv2 
Python :: Print a nested list line by line 
Python :: how to install cuda in anaconda 
Python :: django user group check 
Python :: all permutations python 
Python :: flask run on ip and port 
Python :: convert list to array python 
Python :: dropping unnamed columns in pandas 
Python :: plot tf model 
Python :: exclude columns in df 
Python :: OneHotEncoder sklearn python 
Python :: get every nth element in list python 
Python :: coronavirus program in python 
Python :: python check if string is number 
Python :: remove duplicate row in df 
Python :: show all rows with nan for a column value pandas 
Python :: how to use colorama 
Python :: drop columns pyspark 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =