# Reading a DataTable's Values with Python

**URL:** <https://forums.unrealengine.com/t/reading-a-datatables-values-with-python/232300>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [May 30, 2021, 4:30am UTC](https://forums.unrealengine.com/t/reading-a-datatables-values-with-python/232300 "2021-05-30T04:30:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stegoboston](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@stegoboston](https://forums.unrealengine.com/u/stegoboston)\
**Post date:** [May 30, 2021, 4:30am UTC](https://forums.unrealengine.com/t/reading-a-datatables-values-with-python/232300/1 "2021-05-30T04:30:09Z")

</div>

Hello and thanks, I’m trying to read the values of my datatables using Python and can’t figure out the last step to actually read the value from a row struct:

DataTable = ItemTable  
DataTableRowStuct = FItemTable  
RowName = “test”  
RowValue = “Name”

> DT = unreal.DataTable(name=“ItemTable”)  
> row = unreal.DataTableRowHandle(data\_table=DT,row\_name=“test”)

This is as far as I can get. Could anyone please help me figure out how to get the value of “Name” from the row? I’ve tried a number of things like: **row.get\_editor\_property(“Name”)** but have had no success I’m assuming that some kind of cast is needed?

---

<div class="post-metadata">

**Author:** ![dpotuznik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dpotuznik](https://forums.unrealengine.com/u/dpotuznik)\
**Post date:** [September 11, 2021, 7:55am UTC](https://forums.unrealengine.com/t/reading-a-datatables-values-with-python/232300/2 "2021-09-11T07:55:38Z")

</div>

hi,  
do you find how ?  
i am also interested

have a nice day  
Daniel

---

<div class="post-metadata">

**Author:** ![stegoboston](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@stegoboston](https://forums.unrealengine.com/u/stegoboston)\
**Post date:** [April 17, 2022, 11:51am UTC](https://forums.unrealengine.com/t/reading-a-datatables-values-with-python/232300/3 "2022-04-17T11:51:51Z")

</div>

Apology for the delayed response. No I was unable to find out how to do this, and asked around and researched it quite a bit. It seems like something that should be fairly common to do in Python so I’m surprised the information isn’t there.

I solved this in a very unfun and heavy way by stopping using python all together and made a C++ editor module plugin which was able to access DataTables.

---

<div class="post-metadata">

**Author:** ![jawnthen\_sds](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jawnthen\_sds](https://forums.unrealengine.com/u/jawnthen_sds)\
**Post date:** [April 4, 2023, 6:40pm UTC](https://forums.unrealengine.com/t/reading-a-datatables-values-with-python/232300/4 "2023-04-04T18:40:34Z")

</div>

I had some luck using [unreal.DataTableFunctionLibrary](https://docs.unrealengine.com/5.1/en-US/PythonAPI/class/DataTableFunctionLibrary.html#)

If you know your column name, something like this could work

```auto
col_name = "Location"    
row_names = unreal.DataTableFunctionLibrary.get_data_table_row_names(dt)
positions = unreal.DataTableFunctionLibrary.get_data_table_column_as_string(dt, col_name)
    for idx, col in enumerate(positions):
        print(f"{row_names[idx]} - {col_name}: {col}")

```
