dictionary tag

93 questions


1 answers
61 views
0
Dictionary question in Python list.

When there are various dictionaries in the list, I wonder how to extract them and how to apply them.For example, x = [{'company' : 'Nexon' , 'pay': 300}, {'company' : 'Kakao' , 'pay': 200}, {'company'...

2 years ago

1 answers
83 views
0
If you create a data frame with overlapping dictionaries and save it as an Excel file, there's an omitted information

fleet_list = {}airlines = ['lj-jna', 'ke-kal', 'oz-aar', '7c-jja', 'bx-abl', 'tw-twb', 'rs-asv']for i in airlines: driver.get('https://www.flightradar24.com/data/airlines/%s' % i) driver.find_element_...


2 answers
86 views
0
Add ranking to Python questions [('a', 14), ('b', 14), ('c', 7), ('d', 6), ('e', 3), ('f', 1)].

list_a = [('a', 14), ('b', 14), ('c', 7), ('d', 6), ('e', 3), ('f', 1)]when [('a', 14, 1), ('b', 14, 1), ('c', 7, 3), ('d', 6, 4), ('e', 3, 5), ('f', 1, 6)]In this way, I want to rank them in descendi...

2 years ago

2 answers
78 views
0
To sum certain values in a dictionary

{'A': [8, 4, 'Team1'], 'B': [7, 6, 'Team2'], 'C': [4, 7, 'Team1'], 'D': [5, 5, 'Team2'], 'E': [2, 9, 'Team1'], 'F': [9, 3, 'Team2'], 'G': [7, 8, 'Team1'], 'H': [6, 4, 'Team2']} In this dictionary, I w...

2 years ago

1 answers
125 views
0
How do I unfold python overlaid dict without a flatten external library?

nested = {'X': {'a': {'one': 10, 'two': 20}, 'b': {'one': 10, 'two': 20}, 'Y': {'a': {'one': 10, 'two': 20}, 'b': {'one': 10, 'two': 20}}}This dict value is nested = {'X_a_one':10, 'X_a_two':20...}I'...


2 answers
59 views
0
If Python matches a certain variable with a dictionary key value, you want to create a syntax that outputs a dictionary value. Help me, T...T

Q: If a certain variable value matches a dictionary key value with Python, you want to create a syntax that outputs a value value. For example,Season = Spring s_fruit = { 'Spring' : 'Strawberry', 'Sum...

2 years ago

1 answers
82 views
0
[Python Beginner] Question why the results depend on the difference in the empty dictionary declaration position (in or out) in the for statement

Hello, I'm a beginner at Python.I want to create a dictionary that increases sequentially with a for statement and add it to one list It depends on the difference in the position of the empty dictiona...

2 years ago

2 answers
53 views
0
Python Dictionary Question. Make a dictionary with the values of the list as key values and the values are all '0'

list1 = ['1','2','3','4','5','6']I want to make a dictionary with list1 as the key value and all the values are 0If there are more than 100 values in list1, you cannot put them one by one by one.In fa...

2 years ago

1 answers
104 views
0
Ask questions about using the python global keyword. Why can you refer to function external variables when you do not declare global?

I'm practicing implementing the Fibonacci sequence using a recursive function dic = {1: 1, 2: 1}def pibo(n): if n in dic: return dic[n] else: out = pibo(n-1) + pibo(n-2) dic[n] = out return out...

2 years ago

1 answers
40 views
0
I'm trying to get the dictionary value of T-map API json result with Python, but it doesn't work

Hi, how are you?Using anaconda, T-map API was imported from Python as a request for json, and it was saved in dictionary form. I want two values here, but it's hard to get them. What did you type wron...

2 years ago
« - 7 - »

© 2024 OneMinuteCode. All rights reserved.