0

I'm new to programming, but I've managed using Python within a week to run python-pandas-suds-jurko and SoapUI queries on a Cisco call manager very successfully so far, I can copy data into .csv files and do pandas analysis, the CUCM GUI is now positively slow in comparison.

udpblf = client.service.updateDeviceProfile(
name=deviceProfileName,
busyLampFields={'busyLampField': 
                [{'blfDest' : **df.iloc[x,y]**,'label': df2.iloc[x,y],'index': x,} , 
                 #{'blfDest' : "1002",'label': "Mr Smith",'index': x,},
                ]                    
})

In the code above, as I'm using pandas, I use the df.iloc[x,y] to insert cell information into the update command, as the csv only ever has two columns 'y' will be an integer 0 or 1. X however will be determined by how many speed dials the user has, these being retrieved from the .csv file previously obtained by a suds query.

The problem I have is that because the above code forms part of the running script I dont know how to dynamically add additonal lines (one per speed dial) thus updating the df.iloc[x,y] info per line and have it run

I could get python to output the information to an external script and run it with exec I guess, but is there a way to do this inline if that makes sense

MaxU - stand with Ukraine
  • 205,989
  • 36
  • 386
  • 419
  • 2
    Not sure what you're trying to do. Maybe you can give a better example? See: http://stackoverflow.com/help/mcve – Alan Kavanagh Jun 04 '16 at 12:48
  • 3
    [how to make good reproducible pandas examples](http://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) – MaxU - stand with Ukraine Jun 04 '16 at 12:49
  • Ok i'll try again hopefully as I understand more I'll be able to be more precise – HenryJoeseph Jun 04 '16 at 13:07
  • if a csv file has two cells place their contents in var1 and var2 and run the line of python code command = var1, var2 if the csv has 4 cells command = var1, var2,var3,var4 and run the code The issue is the cells in the csv will vary and so the code will need to change accordingly but I want the code to change as I run the code I've just read this and you can tell I'm no programmer :) – HenryJoeseph Jun 04 '16 at 13:07
  • Ignore my gibberish I've found another less complex answer much appreciated – HenryJoeseph Jun 05 '16 at 11:45

0 Answers0