
Python
Quiz by Support - BusinessPromoted .com
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
20 questions
Show answers
- Q11. How can you embed a Python script in Power BI to perform data transformation?Use SQL Script in Power Query EditorUse Python Script in Power Query EditorUse DAX Script in Power Query EditorUse R Script in Power Query Editor120s
- Q22. Which Python library is most commonly used for data manipulation and analysis in Power BI?numpypandasseabornmatplotlib120s
- Q33. How can you handle missing values in a dataset using Python in Power BI?df.fillna()df.interpolate()df.replace()df.dropna()120s
- Q44. What is the purpose of using 'df.groupby()' in a Python script within Power BI?To group data based on one or more columnsTo sort dataTo filter dataTo merge dataframes120s
- Q55. How can you visualize data using Python in Power BI?Use matplotlib or seaborn within a Python visualUse numpyUse pandasUse SQL120s
- Q66. How do you ensure your Python environment is set up correctly for Power BI integration?Install Java and required librariesInstall R and required librariesInstall SQL Server and required librariesInstall Python and required libraries, and set the correct Python home directory in Power BI120s
- Q77. How do you read a CSV file into a pandas DataFrame in Power BI?pd.get_csv('file_path')pd.open_csv('file_path')pd.read_csv('file_path')pd.load_csv('file_path')120s
- Q88. How can you merge two DataFrames in Python for use in Power BI?pd.concat(df1, df2)pd.append(df1, df2)pd.merge(df1, df2, on='key')pd.join(df1, df2, on='key')120s
- Q99. What method would you use to remove duplicates from a DataFrame in Python within Power BI?df.remove_duplicates()df.clear_duplicates()df.delete_duplicates()df.drop_duplicates()120s
- Q1010. How can you create a new column in a DataFrame in Python to calculate the total sales from quantity and price columns?df['Total Sales'] = df['Quantity'] * df['Price']df['Total Sales'] = df['Quantity'] - df['Price']df['Total Sales'] = df['Quantity'] / df['Price']df['Total Sales'] = df['Quantity'] + df['Price']120s
- Q1111. How do you handle large datasets in Python within Power BI to ensure performance?Use chunking with pd.read_csv()Use SQL queriesUse Excel for pre-processingLoad the entire dataset at once120s
- Q1212. How can you apply a custom function to each element of a column in a DataFrame in Power BI using Python?df['column'].map(custom_function)df['column'].sort(custom_function)df['column'].filter(custom_function)df['column'].apply(custom_function)120s
- Q1313. How can you perform a left join between two DataFrames in Python within Power BI?pd.concat(df1, df2, how='left')pd.merge(df1, df2, how='left')pd.join(df1, df2, how='left')pd.append(df1, df2, how='left')120s
- Q1414. Which method would you use to pivot a DataFrame in Python within Power BI?df.stack()df.unstack()df.pivot()df.melt()120s
- Q1515. How do you filter rows in a DataFrame based on a condition in Python for Power BI?df[df['column'] > value]df.where('column' > value)df.select('column' > value)df.filter('column' > value)120s