Skip to content

Instantly share code, notes, and snippets.

@vnegi10
Created April 10, 2021 11:21
Show Gist options
  • Save vnegi10/21503fc704a07637b8a42dafd274b8e2 to your computer and use it in GitHub Desktop.
Save vnegi10/21503fc704a07637b8a42dafd274b8e2 to your computer and use it in GitHub Desktop.
function raw_to_df(raw_data)
df = DataFrame(raw_data[1])
df_names = Symbol.(vcat(raw_data[2]...))
df = DataFrames.rename(df, df_names)
timestamps = df[!,:timestamp]
select!(df, Not([:timestamp]))
for col in eachcol(df)
col = Float64.(col)
end
df[!,:Date] = Date.(timestamps)
return df
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment