TypeError: ufunc 'isnan' is not supported for input types, - Heatmap nautical map

I get an error when I try to build marine thermal insulation

TypeError: ufunc 'isnan' is not supported for input types, and inputs cannot be safely bound to any supported types according to the casting rule `` safe ''

my code is as follows

import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

df = pd.read_table(r"C:\Results.CST", sep='\s+',header=11, engine = 'python')
df2 = cridim[['Bottom','Location_X','Location_Y',]]  # Bottom , location X and Location  Y are my column labels
df3 = df2.pivot('Location_X','Location_Y','Bottom') # create pivot table for results

plt.figure(figsize=(15,15)) 
pivot_table = df3
plt.xlabel('X',size = 10) 
plt.ylabel('Y',size = 10) 
plt.title('btm CD',size = 10) 
sns.heatmap(pivot_table, annot=False, fmt=".1f", linewidths = 0.5, square = True, cmap = 'RdYlBu', vmin=2900, vmax = 3500) 
plt.show()

My data includes 77 rows and 77 columns, of which only 651 have data, the remaining empty coordinates are indicated as None in the dataframe

Is there a limit on the amount of data a marine heatmap can apply?

I'm not sure why I get the above error, I wrote it to the csv file and everything works out fine.

, "0" , Typeerror

+7
1

, seaborn, .

Seaborn , . , , NaN .

df.astype(float) seaborn. , NaN.

0

Source: https://habr.com/ru/post/1675269/


All Articles