Advanced Analytics in Power BI with R and Python by Ryan Wade

Advanced Analytics in Power BI with R and Python by Ryan Wade

Author:Ryan Wade
Language: eng
Format: epub
ISBN: 9781484258293
Publisher: Apress


Step 5: Use the mapr_df function to combine the sheets into a single data frame

In this step, you add one line of code to the workflow, but there is a lot going on in this line of code that needs to be unpacked. Here is what the workflow looks like with the extra code added:df <- excel_file_path %>%

excel_sheets() %>%

set_names() %>%

map_dfr(.f= ~read_excel(path= excel_file_path, sheet= ..1)

,.id = "sheet"

)

Let’s explain what’s going on in the last line:The named character vector created in the previous step is passed to the map_dfr() function as the first argument.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.