Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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",
}
)
Solved! Go to Solution.
@Anonymous , I ran the same script and I am getting 1.0 (only added pandas).
Check for any transformation in power query
Thanks.
That was the error, i had to chanege my regional configuration for one that used "." insted of "," to separete decimals.
Thanks.
That was the error, i had to chanege my regional configuration for one that used "." insted of "," to separete decimals.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!