# Plotly heat map showing nan

**URL:** <https://community.plotly.com/t/plotly-heat-map-showing-nan/73394>\
**Category:** 📊 Plotly Python\
**Tags:** question, bug-reporter\
**Created:** [March 9, 2023, 6:01am UTC](https://community.plotly.com/t/plotly-heat-map-showing-nan/73394 "2023-03-09T06:01:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anand\_ak-18](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@Anand\_ak-18](https://community.plotly.com/u/Anand_ak-18)\
**Post date:** [March 9, 2023, 6:01am UTC](https://community.plotly.com/t/plotly-heat-map-showing-nan/73394/1 "2023-03-09T06:01:26Z")

</div>

A column in a dataframe having values of zero also checked its dtype it is int64 and while plotting the heatmap in plotly it is showing nan.

fig1 = px.imshow(df2, text\_auto=True, aspect=“auto”, width=1500, height=800)

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [March 9, 2023, 7:12am UTC](https://community.plotly.com/t/plotly-heat-map-showing-nan/73394/2 "2023-03-09T07:12:04Z")

</div>

Hi @Anand_ak-18, I can’t reproduce this, check your data again.

```python
import pandas as pd
import plotly.express as px
import numpy as np

np.random.seed(42)

df = pd.DataFrame(
    np.random.randint(0, 10, size=(20, 4)), 
    columns=list('ABCD')
)
fig = px.imshow(
    df, 
    text_auto=True, 
    width=500, 
    height=500,
)
fig.show()

```

![newplot (7)](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/a/2/a2854dd0d75f8dc525fa3858bed8be56d7f4cad4.png)
