If only one distinct value, record that in most_commond and leave least_common as null

This commit is contained in:
Simon Willison 2020-12-11 21:30:44 -08:00
commit 5c176ccbe0

View file

@ -1961,7 +1961,6 @@ class Table(Queryable):
"select [{}] from [{}] limit 1".format(column, table)
).fetchone()[0]
most_common = [value]
least_common = [value]
else:
most_common = [
(r[0], r[1])