Hyperion Financial Data Quality Management (FDM/FDMEE) (MOSC)

MOSC Banner

How to convert strfield to float after using strip to remove whitespace

I am trying to convert strfield to a float so it can be used for multiplication, however that is not working. Below is the code:

def Rates (strfield, strrecord):

abc = strrecord[45:48].strip()

fdmAPI.logInfo(abc)

fdmAPI.logInfo("Log1")

#strip double quotes and convert to float

strfield = strfield.strip('"')

fdmAPI.logInfo(strfield)

Should we use strfield = float(strfield.strip('"')) or first strfield = strfield.strip('"') and then strfield = float(strfield)

Kindly, help

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center