merchmallow
merchmallow

Reputation: 794

Creating a Julia DataFrame with long ColumnName

i am trying to create DataFrame in Julia using: df2 = DataFrame(A = 1:5)and its all right.

Now i want to create df = DataFrame("Amount") = 1:5) but it returns an error. I tried many thing and cant create a DataFrame with column names like "Amount", " Class Problem" etc..

How can i do it?

Thanks

Upvotes: 2

Views: 62

Answers (1)

Bogumił Kamiński
Bogumił Kamiński

Reputation: 69819

Use => syntax instead, e.g.:

DataFrame("Amount" => 1:5, "Class Problem" => "const")

Upvotes: 1

Related Questions