Get a query_set and
Due to duplicate values in hoge column,
I would like to eliminate duplicates.
I'd like to write this in a list format. How should I write it?
want_list=[]
pass_hoge_list = [ ]
for i in list(query_set):
if not i.get(hoge) in pass_hoge_list:
pass_hoge_list.append(i.get('hoge')))
want_list.append(i)
{i.get("hoge"):i for i in query_set}.values()
Is it like this?
366 Is there any other way to save the Python database?
345 Who developed the "avformat-59.dll" that comes with FFmpeg?
362 To Limit Column Values to Strings in a String List Using sqlalchemy
351 I have saved several codes written in python to a visual studio file.
361 Add dataframe values of the same structure without column names
© 2023 OneMinuteCode. All rights reserved.