# Global const dataframe

**URL:** https://discourse.julialang.org/t/global-const-dataframe/135996
**Category:** New to Julia
**Created:** [March 3, 2026, 5:48pm UTC](https://discourse.julialang.org/t/global-const-dataframe/135996 "2026-03-03T17:48:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mekapses](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mekapses](https://discourse.julialang.org/u/mekapses)
#### Post date: [March 3, 2026, 5:48pm UTC](https://discourse.julialang.org/t/global-const-dataframe/135996/1 "2026-03-03T17:48:31Z")

</div>

I’ve got a module DataManagment with a module global main\_dataframe defined as such:  
global const main\_dataframe = DataFrame()  
I’m using it to have a main store of data for a series of experiments. But when I access it from the experiment:  
include(“DataManagement.jl”)  
using .DataManagement  
push!(main\_dataframe, named\_tuple\_of\_data)  
the dataframe does not appear to update. If I  
return main\_dataframe  
it gives me back an updated dataframe, but when I look at DataManagement.main\_dataframe, the dataframe is still empty. What am I doing wrong? Is this the best way to do what I’m trying to do?  
Thanks,  
–Markos

---

<div class="post-metadata">

### Author: ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)
#### Post date: [March 3, 2026, 5:56pm UTC](https://discourse.julialang.org/t/global-const-dataframe/135996/2 "2026-03-03T17:56:04Z")

</div>

What you’ve written there _should_ work, but it’s obviously not the whole situation. I would check to make sure that you’re not _shadowing_ the `main_dataframe` that’s implicitly imported by the `using DataManagement` with another — completely independent! — local with the same name.

---

<div class="post-metadata">

### Author: ![mekapses](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mekapses](https://discourse.julialang.org/u/mekapses)
#### Post date: [March 3, 2026, 7:06pm UTC](https://discourse.julialang.org/t/global-const-dataframe/135996/3 "2026-03-03T19:06:38Z")

</div>

I’ve made every call to main\_dataframe explicitly DataManagement.main\_dataframe. Nonetheless, it still returns the updated dataframe (as a check) but DataManagement.main\_dataframe is still a properly defined frame, with all the right fields, but remains empty.

---

<div class="post-metadata">

### Author: ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)
#### Post date: [March 3, 2026, 11:01pm UTC](https://discourse.julialang.org/t/global-const-dataframe/135996/4 "2026-03-03T23:01:11Z")

</div>

This is odd enough to warrant a MWE. For instance, it’s not obvious where a `return main_dataframe` would even be applicable here, there’s no method. If it helps, you can check whether the dataframe assigned to `DataManagement.main_dataframe` and the returned dataframe are the same with `===`.

---

<div class="post-metadata">

### Author: ![mekapses](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mekapses](https://discourse.julialang.org/u/mekapses)
#### Post date: [March 4, 2026, 9:20pm UTC](https://discourse.julialang.org/t/global-const-dataframe/135996/5 "2026-03-04T21:20:35Z")

</div>

I seem to have figured it out. The problem was multiple includes clobbering the namespace. So, a followup question: best practices seem to be to only include in your top level file, export all variables and functions you want to have accessed internally, and access from other modules as using Main.MyModule. Is this correct? Is there another way of going about this that’s more safe, or even more Julia-like?
