Skip to main content
added 16 characters in body
Source Link

Using the Energy Information Agency's (EIA) 860 report that covers all generation assets in the US I may have came up with a simpler example. You can download the same data from EIA 860 Database.

wbLocation = "C:\\Users\\xxxxxx\\Documents\\eia8602019\\3_1_Generator_Y2019.xlsx";

sheetL = Import[wbLocation, "Sheets"]

{"Operable", "Proposed", "Retired and Canceled"}

You can nest the list of sheets within the "Dataset" command. The hiccup comes from needing to convert the initial datasets into a list of associations to be able to put the use the AssociationThread function appropriately. Then you can apply the Dataset function and get the desired results.

Dataset[
  AssociationThread[sheetL, 
    Normal[
      Import[wbLocation, 
         {"Dataset", sheetL}, HeaderLines"SkipLines"->1,"HeaderLines" -> 2]]]]1]]]]

Using the Energy Information Agency's (EIA) 860 report that covers all generation assets in the US I may have came up with a simpler example. You can download the same data from EIA 860 Database.

wbLocation = "C:\\Users\\xxxxxx\\Documents\\eia8602019\\3_1_Generator_Y2019.xlsx";

sheetL = Import[wbLocation, "Sheets"]

{"Operable", "Proposed", "Retired and Canceled"}

You can nest the list of sheets within the "Dataset" command. The hiccup comes from needing to convert the initial datasets into a list of associations to be able to put the use the AssociationThread function appropriately. Then you can apply the Dataset function and get the desired results.

Dataset[
  AssociationThread[sheetL, 
    Normal[
      Import[wbLocation, 
         {"Dataset", sheetL}, HeaderLines -> 2]]]]

Using the Energy Information Agency's (EIA) 860 report that covers all generation assets in the US I may have came up with a simpler example. You can download the same data from EIA 860 Database.

wbLocation = "C:\\Users\\xxxxxx\\Documents\\eia8602019\\3_1_Generator_Y2019.xlsx";

sheetL = Import[wbLocation, "Sheets"]

{"Operable", "Proposed", "Retired and Canceled"}

You can nest the list of sheets within the "Dataset" command. The hiccup comes from needing to convert the initial datasets into a list of associations to be able to put the use the AssociationThread function appropriately. Then you can apply the Dataset function and get the desired results.

Dataset[
  AssociationThread[sheetL, 
    Normal[
      Import[wbLocation, 
         {"Dataset", sheetL},"SkipLines"->1,"HeaderLines" -> 1]]]]
Source Link

Using the Energy Information Agency's (EIA) 860 report that covers all generation assets in the US I may have came up with a simpler example. You can download the same data from EIA 860 Database.

wbLocation = "C:\\Users\\xxxxxx\\Documents\\eia8602019\\3_1_Generator_Y2019.xlsx";

sheetL = Import[wbLocation, "Sheets"]

{"Operable", "Proposed", "Retired and Canceled"}

You can nest the list of sheets within the "Dataset" command. The hiccup comes from needing to convert the initial datasets into a list of associations to be able to put the use the AssociationThread function appropriately. Then you can apply the Dataset function and get the desired results.

Dataset[
  AssociationThread[sheetL, 
    Normal[
      Import[wbLocation, 
         {"Dataset", sheetL}, HeaderLines -> 2]]]]