Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.5K Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

SemanticImport function can't import Chinese characters in MS Excel.

Posted 3 years ago
Attachments:
POSTED BY: Zhenyu Zeng
3 Replies
Posted 3 years ago

Hi Zhenyu,

Looks like a bug to me. Import works fine. I would suggest using Import and doing any type / unit conversions on the imported data.

Import["~/Downloads/5.xlsx"]
(*
{{{"采样点编号", "年", "月", "日期", "时间", "\[Degree]C", "mmHg", "DO %", "DO mg/L", "SPC-uS/cm", "C-uS/cm"}}}
*)

Are the values in each column also in 普通话 or 英语?

POSTED BY: Rohit Namjoshi
Posted 3 years ago

Hi Rohit,

Values in each column are in 普通话. If use Import function, there is need to convert List to Dataset, so I asked this question.

POSTED BY: Zhenyu Zeng
Posted 3 years ago

Zhenyu,

You can Import the spreadsheet as a Dataset

data = Import["ExampleData/elements.xls", {"Dataset", 1}, HeaderLines -> 1]

Then you can add columns, change columns, ... e.g.

data[All,
 <|#,
    "Density" -> Entity["Element", #Name]["Density"],
    "Name" -> ToUpperCase[#Name],
    "Weight / Number" -> #AtomicWeight/#AtomicNumber|> &]
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