Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm using python visuals for plotting 2 columns (DEPTH and GR) of a Well-Log dataset in a "vertical line chart".
The target chart looks like this:
The Python script in jupyter notebook is pretty simple:
import lasio
file_path = "Well-Logs-and-Petrophysics/Data/15-9-19_SR_COMP.LAS"
las = lasio.read(file_path)
df = las.df()
df.reset_index(drop=False, inplace=True)
df.rename(columns={'index': 'Index', 'DEPT':'DEPTH'}, inplace=True)
df.dropna(how='any', axis=0, inplace=True)
x = df['GR']
y = df['DEPTH']
plt.plot(x, y)
For loading the data into Power BI, I'm using the same firsts lines to read (and clean) the LAS file as a dataframe.
Finally, I'm using the using the following code for the python visual:
import matplotlib.pyplot as plt
dataset.plot(kind='line', x='GR', y='DEPTH')
plt.show()
But the image plotted is the following:
Summary:
The python script is the same as in jupyter notebook, than in power bi, but power BI is not plotting the same way.
Question:
What is happening, and how to achieve desired well-log visualization in Power BI using Python visuals
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
55 | |
54 | |
38 | |
29 |
User | Count |
---|---|
78 | |
62 | |
45 | |
40 | |
40 |