Looking to get the sum of OPINT_1 for an options chain RIC (0#KODK*.U) by puts and calls. I separated out the puts and calls into different lists. But I cannot find any instruction on how to now sum these values. As you can tell, I'm a beginner here. My goal is to look at the summed data in a time series.
fields = ['PUTCALLIND', 'STRIKE_PRC', 'OPINT_1']
kodk = ek.get_data('0#KODK*.U' , fields=fields)
kodkputs = kodk[kodk['PUTCALLIND'] == 'PUT ']
kodkcalls = kodk[kodk['PUTCALLIND'] == 'CALL']
If you would like to know how to sum() the data on a dataframe.
Here is the dataframe document.
Here is the sample code: