You are creating a Python visual in Power BI Desktop. You need to retrieve the value of a column named Unit Price from a DataFrame. How should you reference the Unit Price column in the Python code?
This syntax accesses the Unit Price column by specifying the column name within square brackets after the dataset object. Using dataset['Unit Price'] retrieves the values from the specified column for further processing or visualization in the Python visual.
A is correct since it's how you select a column in pandas dataframe.
https://pandas.pydata.org/docs/getting_started/intro_tutorials/03_subset_data.html
C is to initialize a new dataframe. In this case it will initialize a dataframe with each character as a column value (string is an iterable in Python)
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html
Question is so bad but the forst param for a dataframe is data and
a string cannot be dataset column just an index So for me A
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html
I think A, because:
You can access columns in the dataset by using their names. For example, you can code dataset["Age"] in your Python script to access the age field.
This section is not available anymore. Please use the main Exam Page.DP-500 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
JasonVu
Highly Voted 2 years, 6 months agolouisaok
Highly Voted 2 years, 5 months agoDarioReymago
Most Recent 1 year, 2 months agosheilawu
1 year, 8 months agoPrudenceK
1 year, 11 months agoPrudenceK
1 year, 11 months agoEltooth
1 year, 11 months agoPlb2
1 year, 11 months agoameer989
1 year, 12 months agomissinglilo
1 year, 12 months agodev2dev
2 years, 1 month agoDarioReymago
2 years, 2 months agoHN_3532
2 years, 3 months agoAValester
2 years, 4 months agoFer079
2 years, 4 months agotaza31
2 years, 4 months agomaster_artyom1983
2 years, 5 months agoabain89
2 years, 5 months ago