Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 NameError: name 'display' is not defined when running code on power bi

New to python and have installed it.

looking to use it for some machine learning but to begin with trying to get it working.

can run below o. in juypter and have python installed to D:\python.

have installed pandas sand below works in juypter.

import pandas as pd

# create a simple dataset of people
data = {'Name': ["John", "Anna", "Peter", "Linda"],
        'Location' : ["New York", "Paris", "Berlin", "London"],
        'Age' : [24, 13, 53, 33]

data_pandas = pd.DataFrame(data)
# IPython.display allows "pretty printing" of dataframes
# in the Jupyter notebook

however when try run in power bi

get message below

Details: "ADO.NET: Python script error. Traceback (most recent call last): File "PythonScriptWrapper.PY", line 20, in <module> display(data_pandas) NameError: name 'display' is not defined
power bi also pointed to d:\python and it is also in PATH.

Anyone know how to resolve this and also and useful really simple python machine learning tutorials/example python code for supply chain/logistics delivery/vehicle maintenance predictions?

Yoriz wrote Jul-23-2019, 06:45 PM:
Please post all code, output and errors (in it's entirety) between their respective tags. I did it for you this time, Here are instructions on how to do it yourself next time.
Thanks for replies.

When leave out the display(data_pandas) works o.k . in power bi

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Running tests in a sibling directory to code sodhiar 1 114 Nov-07-2019, 11:28 PM
Last Post: MckJohan
  NameError: NameError: global name 'BPLInstruction' is not defined colt 7 296 Oct-27-2019, 07:49 AM
Last Post: Larz60+
  Function Annotation got NameError: name 'xxx' is not defined Lance 6 244 Oct-23-2019, 03:13 AM
Last Post: Lance
  NameError: name 'processing' is not defined soli004 2 339 Sep-07-2019, 11:57 AM
Last Post: soli004
  tkinter - "NameError: name 'frame' is not defined" Mocap 3 947 Jul-21-2019, 09:03 PM
Last Post: Yoriz
  How To Display this Python Code in Web browser? pradhan 1 275 Jul-14-2019, 06:59 PM
Last Post: snippsat
  [split] NameError: name 'lo' is not defined when using input ? Cedmo 2 394 Jul-05-2019, 09:39 PM
Last Post: Cedmo
  NameError: name 'lst' is not defined Jmekubo 2 767 Apr-27-2019, 12:34 PM
Last Post: Jmekubo
  *** NameError: name '' is not defined adamG 1 843 Apr-08-2019, 01:21 PM
Last Post: ichabod801
  Syntax Error when running code codeman 3 511 Apr-02-2019, 11:47 AM
Last Post: codeman

Forum Jump:

Users browsing this thread: 1 Guest(s)