Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

declare pandas dataframe with values

import pandas as pd

data = {'first_column':  ['first_value', 'second_value', ...],
        'second_column': ['first_value', 'second_value', ...],
         ....
        }

df = pd.DataFrame(data)

print (df)
Comment

PREVIOUS NEXT
Code Example
Python :: Find Files With a Certain Extension in the Directory and Its Subdirectories in Python 
Python :: notna pandas 
Python :: extract nonzero array elements python 
Python :: how to get the type of numpy array 
Python :: get every item but the last item of python list 
Python :: how to create an entry box on tkinter python 
Python :: python trim whitespace from end of string 
Python :: pandas xa0 
Python :: reorder columns pandas 
Python :: how to make dictionary in python 
Python :: print hexadecimal in python 
Python :: access list items in python 
Python :: python split lines 
Python :: check if numpy array contains only duplicates 
Python :: django password field 
Python :: sort folders content by name python 
Python :: get scipy version python 
Python :: basic script 
Python :: join to dataframes pandas 
Python :: how to make a function in python 
Python :: python longest list in list 
Python :: django datepicker 
Python :: how to write variables in python 
Python :: write to csv pandas 
Python :: python async function 
Python :: python how to find circumference of a circle 
Python :: add a list in python 
Python :: Python RegEx Escape – re.escape() 
Python :: how to check if python is installed 
Python :: unsigned int python 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =