# Is python pandas faster than julia CSV?

**URL:** <https://discourse.julialang.org/t/is-python-pandas-faster-than-julia-csv/42183>\
**Category:** General Usage\
**Tags:** csv\
**Created:** [June 28, 2020, 4:36am UTC](https://discourse.julialang.org/t/is-python-pandas-faster-than-julia-csv/42183 "2020-06-28T04:36:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hafez\_ahmad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hafez_ahmad/32/14423_2.png) [@hafez\_ahmad](https://discourse.julialang.org/u/hafez_ahmad)\
**Post date:** [June 28, 2020, 4:36am UTC](https://discourse.julialang.org/t/is-python-pandas-faster-than-julia-csv/42183/1 "2020-06-28T04:36:43Z")

</div>

I have a CSV file which is 40.0kb. I tried both in pandas(python3.7) and CSV(julia1.4.2). I found python pandas is much faster than Julia CSV. however, Julia is faster than python in every case. why reading CSV is slower in Julia?

julia code:

```julia
using CSV
@time df=CSV.read("C:/Users/hafez/personal/r/tutorial for students/Book2.csv")

```

6.203511 seconds (8.55 M allocations: 409.590 MiB, 1.29% gc time)

python code:

```julia
import pandas as pd
import time
start=time.time()
df=pd.read_csv("C:/Users/hafez/personal/r/tutorial for students/Book2.csv")
print(time.time()-start)

```

0.029919862747192383

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [June 28, 2020, 5:04am UTC](https://discourse.julialang.org/t/is-python-pandas-faster-than-julia-csv/42183/2 "2020-06-28T05:04:56Z")

</div>

it’s not slower  
[https://juliacomputing.com/blog/2020/06/22/fast-csv.html](https://juliacomputing.com/blog/2020/06/22/fast-csv.html)

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [June 28, 2020, 5:08am UTC](https://discourse.julialang.org/t/is-python-pandas-faster-than-julia-csv/42183/3 "2020-06-28T05:08:00Z")

</div>

Presumably that time includes compilation time, i.e. the time required to compile the Julia package when it runs for the first time. If you try reading the same file again you should see that it is much faster on the second and subsequent times.

---

<div class="post-metadata">

**Author:** ![hafez\_ahmad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hafez_ahmad/32/14423_2.png) [@hafez\_ahmad](https://discourse.julialang.org/u/hafez_ahmad)\
**Post date:** [June 28, 2020, 5:23am UTC](https://discourse.julialang.org/t/is-python-pandas-faster-than-julia-csv/42183/4 "2020-06-28T05:23:24Z")

</div>

yeah , you got it, every first time , it takes so much time , when I loaded and run second time it is much faster than pandas.
