Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to select a single cell in a pandas dataframe

# how to select a single cell in a pandas dataframe

import pandas as pd

old = pd.DataFrame({'A' : [4,5], 'B' : [10,20], 'C' : ['cell wanted',50], 'D' : [-30,-50]})
var = old['C'].values[0]

print(var)
 
PREVIOUS NEXT
Tagged: #select #single #cell #pandas #dataframe
ADD COMMENT
Topic
Name
8+5 =