# Modify a dictionary under a new name modifies the original dictionary

**URL:** <https://discourse.julialang.org/t/modify-a-dictionary-under-a-new-name-modifies-the-original-dictionary/65398>\
**Category:** General Usage\
**Tags:** question\
**Created:** [July 27, 2021, 6:46pm UTC](https://discourse.julialang.org/t/modify-a-dictionary-under-a-new-name-modifies-the-original-dictionary/65398 "2021-07-27T18:46:55Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [July 27, 2021, 7:01pm UTC](https://discourse.julialang.org/t/modify-a-dictionary-under-a-new-name-modifies-the-original-dictionary/65398/4 "2021-07-27T19:01:43Z")

</div>

`copy` is a shallow copy, i.e. it’s not copied recursively. That’s what `deepcopy` is for, as I’ve mentioned above. Your `x` is a `Dict`, so regular `copy` creates a distinct `Dict` instance, but the DataFrame inside is still the same object.

I don’t know what `row` is, so I can only guess at what’s going wrong. If it still doesn’t work, please [provide a MWE](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757) to make it easier to debug your problem.

---

_[View the full topic](https://discourse.julialang.org/t/modify-a-dictionary-under-a-new-name-modifies-the-original-dictionary/65398)._
