Jump to content

Recommended Posts

Posted

This is what I am currently doing to get the enumeration value from an enum type return:

    enum_tagdata = spy.pull(raw_signals[raw_signals['Source Value Unit Of Measure'] =='string'],
             start=batchstart,
             end=batchend,         
             grid='15min')
    enum_tagdata = enum_tagdata.replace(regex=r'^ENUM{{', value='')
    enum_tagdata= enum_tagdata.replace(regex=r'\|[a-zA-z].*}}', value='')
    enum_tagdata =enum_tagdata.apply(pd.to_numeric, errors='coerce', axis=1,downcast='integer')
 
Is there a way in the call to seeq to ask for just the string or just the value to be returned? Or is there a more elegant or crafty way of handling enums in python?
 
Thanks!
Ivan

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...