# Reading data text files delimited with both spaces & tabs

**URL:** <https://discourse.julialang.org/t/reading-data-text-files-delimited-with-both-spaces-tabs/64851>\
**Category:** General Usage\
**Tags:** csv, io\
**Created:** [July 18, 2021, 10:49am UTC](https://discourse.julialang.org/t/reading-data-text-files-delimited-with-both-spaces-tabs/64851 "2021-07-18T10:49:23Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [July 18, 2021, 12:34pm UTC](https://discourse.julialang.org/t/reading-data-text-files-delimited-with-both-spaces-tabs/64851/4 "2021-07-18T12:34:05Z")

</div>

You can do the replacement in Julia without too much fuzz:

```julia
df = CSV.read(IOBuffer(replace(read("/tmp/testfile.txt"), UInt8('\t') => UInt8(' '))), header=1, delim=" ", ignorerepeated=true, type=Int64, DataFrame)

```

---

_[View the full topic](https://discourse.julialang.org/t/reading-data-text-files-delimited-with-both-spaces-tabs/64851)._
