I'm trying to write a code to define buildings geometric shape, but I have this error message:
The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
I read a lot of posts about it here and somewhere online, but I couldn't find anything similar.
This is my csv_file:
fid Shrt_axis Lng_axis angle area_rett perimeter area
1 12.5 26.07 136.31 325.91 77.15 299.28
2 11.01 11.68 105.24 128.66 45.39 125.11
this is my code:
import pandas as pd
Tabella = pd.read_csv("prova_2.csv", sep=";", header= )
lato_corto = Tabella.loc[:,'Shrt_axis']
lato_lungo = Tabella.loc[:,'Lng_axis']
#continue with other dates from my data set.
rapporto_lati = lato_lungo / lato_corto
for row in Tabella:
if 1 =< rapporto_lati =< 1.1:
print("è un quadrato")
Then i read something on internet, but it didn't work correctly:
if (rapporto_lati > 1) & (rapporto_lati < 1.1):
print('è un quadrato')
In this case, I hadn't any error message, but the result wasn't ok.