Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Power Bi change dataFrame Data

When i use a python script as data source it changes some values, for example if i have a 1.0 when i load the DataFrame in power Bi it'll show me 10.

How can i make power Bi respect the data types from the original dataFrame?

Thanks for the help.

 

 

 

import numpy as np
import pandas as pd

df2 = pd.DataFrame(
     {
         "A": 1.0,
         "B": pd.Timestamp("20130102"),
         "C": pd.Series(1, index=list(range(4)), dtype="float32"),
         "D": np.array([3] * 4, dtype="int32"),
         "E": pd.Categorical(["test", "train", "test", "train"]),
         "F": "foo",
    }
)

 

 

 

sebastiandemeta_0-1627587559187.png

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , I ran the same script and I am getting 1.0 (only added pandas).

 

Check for any transformation in power query 

View solution in original post

Anonymous
Not applicable

Thanks.

That was the error, i had to chanege my regional configuration for one that used "." insted of "," to separete decimals.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , I ran the same script and I am getting 1.0 (only added pandas).

 

Check for any transformation in power query 

Anonymous
Not applicable

Thanks.

That was the error, i had to chanege my regional configuration for one that used "." insted of "," to separete decimals.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.