# Dataframes

**URL:** <https://discourse.julialang.org/t/dataframes/107112>\
**Category:** New to Julia\
**Tags:** question, homework\
**Created:** [December 4, 2023, 12:38pm UTC](https://discourse.julialang.org/t/dataframes/107112 "2023-12-04T12:38:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kearney](https://avatars.discourse-cdn.com/v4/letter/k/a88e4f/32.png) [@Kearney](https://discourse.julialang.org/u/Kearney)\
**Post date:** [December 4, 2023, 12:38pm UTC](https://discourse.julialang.org/t/dataframes/107112/1 "2023-12-04T12:38:39Z")

</div>

i need to generate two plots of two datasets and save them, as .png files,  
respectively, wind-gen.png and system-demand.png. The first plot should be of the wind data, showing both actual power generated and what was forecasted and the second should be a heatmap. I am wondering if anyone could give me a hand with this. One of the column names has a space before it so i am trying to change the name of that column but when i do it omitts the 4th column.

---

<div class="post-metadata">

**Author:** ![mike.ingold](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike.ingold/32/203749_2.png) [@mike.ingold](https://discourse.julialang.org/u/mike.ingold)\
**Post date:** [December 4, 2023, 1:08pm UTC](https://discourse.julialang.org/t/dataframes/107112/2 "2023-12-04T13:08:38Z")

</div>

Ref: [Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757)

What have you tried to rename the column? I typically use the `rename!` function from [here](https://dataframes.juliadata.org/stable/lib/functions/#DataFrames.rename!).

---

<div class="post-metadata">

**Author:** ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Post date:** [December 4, 2023, 1:12pm UTC](https://discourse.julialang.org/t/dataframes/107112/3 "2023-12-04T13:12:09Z")

</div>

It is hard to help you without more information about what you tried and what isn’t working as you expected. See this post below:

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

Some notes that may help:

- Spaces in column names can be handled just fine in DataFrames. Just wrap the name in `"` wherever you write it to treat the name as a `String`.
- There is a `rename!` function in DataFrames that makes changing a column name fairly easy: `rename!(df, "old name" => "new name")`.
- Julia has several different plotting packages that do things differently. Plots.jl, Makie.jl, and AlgebraOfGraphics.jl are some of the most popular. We will need to know which one you are trying to use and types your data are stored in. For a simple line plot with Plots.jl on `DataFrame` data, you can do `plot(df."x column", df."y column")`.
