Group Abstract Group Abstract

Message Boards Message Boards

Build a structured data set from an Excel file

Posted 6 years ago
Attachments:
POSTED BY: Claude Mante
2 Replies

Short and effective!

Thanks, Rohit!

POSTED BY: Claude Mante
Posted 6 years ago

Hi Claude,

(* Import as Dataset *}
dataset = Import["~/Downloads/Peches2005.xlsx", {"Dataset", 1}, HeaderLines -> 1]

(* Select rows that have "TRF" in the "EC1" column *)
dataset[Select[#EC1 == "TRF" &]]

(* Extract the "Total" column for "TRF" *)
dataset[Select[#EC1 == "TRF" &], "Total"]

The dates look correctly parsed to me. Import converts them to DateObject. You can format the DateObject to a String in a very flexible way. Check the documentation.

DateString[Now, "ISODateTime"]
(* 2020-01-22T11:11:53 *)
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard