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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
kkkttt
Frequent Visitor

Python - Pandas DataFrame incorrectly breaks my table into 2 rows

Anyone knows how to deal with this?

 

Here's my original dataset (2 rows):

idtitle

abc

123

t1

 

abc124t2

 

I run below python scripts in Power Query:

# 'dataset' holds the input data for this script
import pandas as pd
data = pd.DataFrame(dataset)

 

And it breaks my dataset into below tables (3 rows):

idtitle

abc

t1

123 
abc124t2

 

I cannot modify the ['id'] column in the raw datasource, how can I fix this error?

I tried to run the same script in Jupyter notebook, and the code doesn't break the row as it did in Power BI.

Thanks in advance.

2 REPLIES 2
Icey
Community Support
Community Support

Hi @kkkttt ,

 

I am curious if my reply above could meet your requirements.

 

If it could, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If not, please let me know.

 

 

Best Regards,

Icey

Icey
Community Support
Community Support

Hi @kkkttt ,

 

Based on your requirements, just try this easier method:

clean1.JPGclean2.JPG

 

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.