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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
When I load in a Python Pandas dataframe with explicitly set string objects in column, this column can get converted to a number (Int or Float) by PowerBI.
It happens when the first X rows of the column look like numbers (not always), but I get errors in later rows that have characters. I can fix by hand by converting the column's data type to text. But it would be better if PowerBI used the native column type.
Example df shows the problem
import pandas
d= [ [1,'1','a1', 100], [2,'2','b2', 200] ]
c = ['a', 'b', 'c', 'd']
df= pandas.DataFrame(d,columns=c)
df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2 entries, 0 to 1
Data columns (total 4 columns):
a 2 non-null int64
b 2 non-null object
c 2 non-null object
d 2 non-null int64
dtypes: int64(2), object(2)
memory usage: 144.0+ bytes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.