Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

change dataframe to list

df.values.tolist()
Comment

transform data frame in list

import pandas as pd

df = pd.DataFrame({'a': [1, 3, 5, 7, 4, 5, 6, 4, 7, 8, 9],
                   'b': [3, 5, 6, 2, 4, 6, 7, 8, 7, 8, 9]})

print(df['a'].to_list())
Comment

PREVIOUS NEXT
Code Example
Python :: create dict from two lists 
Python :: overload operator python 
Python :: how to sort the dataframe in python by axis 
Python :: how to get all messages from a telegram group with telethon 
Python :: save model history keras 
Python :: python function vs lambda 
Python :: get local ip 
Python :: how to reshape dataframe in python 
Python :: undefined in python 
Python :: opencv namedwindow 
Python :: django group with permission 
Python :: views.py django 
Python :: remove multiple strings from list python 
Python :: python first three characters of string 
Python :: create the dataframe column based on condition 
Python :: blender python add collection to scean collection 
Python :: python enum advanced 
Python :: how to check for empty dataframe 
Python :: at=error code=h10 desc= app crashed python flask 
Python :: lamda python 
Python :: python if null 
Python :: python file back to beginning 
Python :: ordered dictionary 
Python :: file uploads django 
Python :: python image crop 
Python :: how to find lcm of 2 numbers in python 
Python :: if condition dataframe python 
Python :: numpy randn with a shape of another array 
Python :: escape sequence in python 
Python :: BURGERS2 solution 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =