Forum Discussion

inm's avatar
inm
Helper II
5 years ago

Change column type change value from another column (Python script)

Hello.

 

I made a python script and it runs in power query, it returns one date and one float column. When I try to change column types according to their values, they change. Changing the column type also changes the values in the same column. Here an example.

 

This is what returns python script.

 

 

 

I try to change the type of date column to date type and and the values in the prediction column change.

 

In report view the values are also different from those shown in power query.

 

In the python script, a model is created with neural networks from the keras library and returns the predictions of the initial data. I believe is due to keras, how can I avoid this?

 

I appreciate any help. Thank you for your ideas and time.

 

 

 

4 Replies

  • edhans's avatar
    edhans
    Community Champion

    what happens if in the step before you do a the change type if you wrap it in a Table.Buffer() function? Just put Table.Buffer() around the entire line, and then change the type to Date.

    • inm's avatar
      inm
      Helper II

      Hi.

      I tried what you said but that also change the values.

      • v-yingjl's avatar
        v-yingjl
        Community Support

        Hi inm ,

        Could you please consider sharing a sample file without any sesentive information or the sample python script query code for further discussion?

         

        Best Regards,
        Community Support Team _ Yingjie Li