I'm working with a dictionary nested in a dataframe and would like to pull a single value out of one of a dictionary.
asdf = {'outside':'10.0.0.14', 'inside':'10.7.0.12', 'name': 'qqqq'}
sdfg = {'outside':'10.0.0.12', 'inside':'10.7.0.14', 'name' : 'zzzz'}
bbbb = ['123.123.123.123', '22.22.22.22', 'foo'] ##also trying it with a list vs dictionary
fullFrameData= pd.DataFrame({
'flow1' : [asdf, sdfg, 240, 1200, 250, 1472],
'flow2' : [bbbb, asdf, 240, 1005, 250, 1472],
})
print ("Test1: {0}".format(fullFrameData.iloc[2]['flow1']))
##returns: 240
print ("Test2: {0}".format(fullFrameData.iloc[1]['flow1']))
##returns: {'outside':'10.0.0.12', 'inside':'10.7.0.14', 'name' : 'zzzz'}
print ("Test3: {0}".format(fullFrameData.iloc[1]['flow2']))
##returns: ['123.123.123.123', '22.22.22.22', 'foo']
I'd like to figure out how to return the 'outside' value or any of the array values by referencing fullFrameData
Been trying something along these lines but isn't the correct syntax:
fullFrameData.iloc[1[0]]['flow1']
fullFrameData.iloc[0][0]['flow2']
fullFrameData.iloc['outside][0]['flow1']
Thanks!