# Historic data alpaca get\_barset annoying NaN values

**URL:** <https://forum.alpaca.markets/t/historic-data-alpaca-get-barset-annoying-nan-values/4683>\
**Category:** Alpaca Market Data\
**Created:** [February 27, 2021, 8:26pm UTC](https://forum.alpaca.markets/t/historic-data-alpaca-get-barset-annoying-nan-values/4683 "2021-02-27T20:26:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tvdevelop1](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@tvdevelop1](https://forum.alpaca.markets/u/tvdevelop1)\
**Post date:** [February 27, 2021, 8:26pm UTC](https://forum.alpaca.markets/t/historic-data-alpaca-get-barset-annoying-nan-values/4683/1 "2021-02-27T20:26:54Z")

</div>

Hi ALPACA team,  
Since Polygon is no longer available I am resorting back to alpaca bar set for historic data.  
However I have encountered an annoying problem when downloading historic data for multiple assets.  
Say assets are [‘A’, ‘PFF’],  
` api.get_barset(['A','PFF'], 'day', limit=None).df`

Returns following

```
                                A ... PFF            
                             open high ... close volume
time ...                    
2020-10-02 00:00:00-04:00 NaN NaN ... 36.490 8297815.0
2020-10-05 00:00:00-04:00 100.99 103.4600 ... 36.730 5825401.0
2020-10-06 00:00:00-04:00 103.12 103.3300 ... 36.775 13036632.0
2020-10-07 00:00:00-04:00 102.47 104.7500 ... 36.930 5146187.0
2020-10-08 00:00:00-04:00 104.20 104.3900 ... 37.010 7018194.0
  ... ... ... ... ...
2021-02-22 00:00:00-05:00 125.95 126.1600 ... 37.535 6197263.0
2021-02-23 00:00:00-05:00 123.51 123.5100 ... 37.510 4757245.0
2021-02-24 00:00:00-05:00 122.26 125.4100 ... 37.440 6439420.0
2021-02-25 00:00:00-05:00 124.81 125.2500 ... 37.150 9318772.0
2021-02-26 00:00:00-05:00 122.93 123.5094 ... 37.370 11018438.0

[101 rows x 10 columns]

```

NaN is due the fact that PFF misses one entry on 2020-11-16. Hence the return has 101 rows and NaN entry for asset ‘A’ as well for 2020-10-02. I know i can fix this at my end but really guys, if Alpaca data is premium now ($49/month Wow BTW!), why not fix it when bar set is called.  
Why is there a NaN entry on 2020-11-16? Usually this should be last closing day entry if the asset did not trade on the day.

Looking forward to a reply from alpaca team.

---

<div class="post-metadata">

**Author:** ![kris](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/kris/32/163_2.png) [@kris](https://forum.alpaca.markets/u/kris)\
**Post date:** [February 28, 2021, 2:54pm UTC](https://forum.alpaca.markets/t/historic-data-alpaca-get-barset-annoying-nan-values/4683/2 "2021-02-28T14:54:37Z")

</div>

look into finviz (i dont own the company) i just use the elite service to export data, just gotta say i love it

---

<div class="post-metadata">

**Author:** ![kris](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/kris/32/163_2.png) [@kris](https://forum.alpaca.markets/u/kris)\
**Post date:** [February 28, 2021, 2:55pm UTC](https://forum.alpaca.markets/t/historic-data-alpaca-get-barset-annoying-nan-values/4683/3 "2021-02-28T14:55:30Z")

</div>

@hitoshi is there a reason NaN is passed through a var ?

---

<div class="post-metadata">

**Author:** ![tvdevelop1](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@tvdevelop1](https://forum.alpaca.markets/u/tvdevelop1)\
**Post date:** [March 1, 2021, 4:03pm UTC](https://forum.alpaca.markets/t/historic-data-alpaca-get-barset-annoying-nan-values/4683/4 "2021-03-01T16:03:21Z")

</div>

Thanks I will take a look at finviz. I hope alpaca will get back to this thread.
