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
I've ran the following Python script in the Query Editor but it does not change the dataset.
# 'dataset' holds the input data for this script
if dataset.iloc[5,2] == 1:
dataset.drop(4)I want the code to delete row 4 if row 5's value column is equal to 1. Any idea if there's a problem with my code? Here is a snippet of the data
Solved! Go to Solution.
# 'dataset' holds the input data for this script
if dataset.iloc[5,2] == 1:
dataset = dataset.drop(4)
# 'dataset' holds the input data for this script
if dataset.iloc[5,2] == 1:
dataset = dataset.drop(4)
You need to click on the Table hyperlink.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |