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 :: check if two columns are equal pandas 
Python :: how to select rows with specific values in pandas 
Python :: list to dict python with same values 
Python :: keras maxpooling1d 
Python :: python game example 
Python :: how to exit program in python 
Python :: python file to list 
Python :: Display the data types of the DataFrame 
Python :: python count character occurrences 
Python :: python logging basicConfig+time 
Python :: xgboost algorithm in python 
Python :: numpy merge 
Python :: Print First 10 natural numbers using while loop 
Python :: django pass parameters in url 
Python :: discord py message link 
Python :: how to run python file from cmd 
Python :: python random array 
Python :: train-test split code in pandas 
Python :: capture image raspberry pi usb camera 
Python :: tkinter icon 
Python :: rgb color python 
Python :: python match statement 
Python :: number of spaes pythopn 
Python :: python timeout exception 
Python :: python split list 
Python :: python jwt 
Python :: crawl a folder python 
Python :: python 3.11 release date 
Python :: remove part of string python 
Python :: python array looping 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =