1

I have a python script that use pandas and create dataframe from csv file and i want to display the dataframe information using pandas-profiling package and show the report in the browser once the user run the function .

But the system does not open the browser and display this error:

ValueError: startfile: filepath too long for Windows

code:

def displayDfInfo(self,df):
        profile = pp.ProfileReport(df)
        html_profile = profile.to_html()
        webbrowser.open(html_profile,new=1)

where is the error and how to fix it?

Georges
  • 29
  • 8

1 Answers1

0

I would simplify it to this:

import webbrowser
html = "myhtml.html"
webbrowser.open(html)
LucioRandy
  • 220
  • 1
  • 19