Couldn't find an answer in previous questions on the subject.
I'm trying to get the minimum value in a column of data, using the following code:
import pandas as pd import matplotlib.pyplot as plt import numpy as np
from tabulate import tabulate as tb from pandas.plotting import scatter_matrix
.......
table = ("Sepal Area (cm^2)", iris_ds.loc[:,"Sepal_area_(cm^2)"].min())
print(tb(table, headers = ["Field", "Min"]))
However, when I run the code, I get the following error:
Traceback (most recent call last):
File "Iris_Data_set1.py", line 148, in print(tb(table, headers = ["Field", "Min"]))
File "C:...\Anaconda3\lib\site-packages\tabulate.py", line 1262, in tabulate tabular_data, headers, showindex=showindex)
File "C:...\Anaconda3\lib\site-packages\tabulate.py", line 947, in _normalize_tabular_data rows = list(map(list,rows)) TypeError: 'numpy.float64' object is not iterable
I've checked the data types, and
Sepal_area_(cm^2) float64
Any ideas on how to fix this