Questions tagged as 'diccionarios'

1
answer

C # Increase by 1 the value of a Dictionaryint, int with LINQ

I have the following dictionary Dictionary<int, int> datos Which contains the following key-values: [0, 2015] [1, 2016] [2, 2017] My goal is to increase the value by 1 ( with LINQ ) so that it stays like this: [0, 2016] [1, 201...
asked by 20.07.2017 / 11:38
2
answers

Dictionaries within a dictionary, python 3

I have a dictionary with lists: d1 = { 'frutas': { ' manzanas': [' verdes', ' 7', ' rojas', ' 5'], 'uvas': [' negras', ' 5', ' verdes', ' 3'] }, ' verduras': { 'papa': ['negras', ' 50', ' blancas', ' 20'], 'cebol...
asked by 16.10.2018 / 00:15
2
answers

Count the words repeated in a dictionary in Python

I would like to count all the repeated words in this dictionary and group them in another dictionary. data = [{'text': 'Real Madrid', 'type': 'ORG'}, {'text': 'España', 'type': 'LOC'}, {'text': 'Real Madrid TV', 'type': 'MISC'}, {'text': 'Espa...
asked by 11.08.2018 / 00:27
2
answers

Excel data extraction to create Python list

I have the following excel file: connection A auto connection A camioneta connection A puerta connection B camioneta connection B puerta connection B capo and I'm looking to put together a diction in python like this: Li...
asked by 31.10.2017 / 04:45
1
answer

Error with pd.DataFrame.replace, can not convert unicode string to float

I am trying to multiply a data frame by reference so I am using a dictionary to multiply it. When I try to fill my dictionary with the values in Excel rows I can not convert the values to float since they are unicode. I am using Python 2.7.10, c...
asked by 01.07.2018 / 00:50
1
answer

Add item to list in Python

I want to make a program in Python in which pressing 1, print a list of colors and pressing 2, give me the option to add a new color and pressing again 1, I see the list of colors with the new addition , What should I do? This is what I have:...
asked by 04.02.2018 / 16:41
1
answer

Doubt about dictionaries in Python

What is the purpose of p in the dictionary? p = Clase() for c in diccionario.keys(): if variable == c: diccionario[c](p)     
asked by 27.12.2017 / 22:28
1
answer

Problem in counting string words using dictionaries

Hi, I'm working on a program where a user can put any type of words and my program brings out the different types of words and the top 5 most used words this is my code: contador = {} grupo = {} while True : palabras=input("ponga pal...
asked by 30.10.2017 / 16:20
1
answer

Selenium python travel dictionary

I am looking to build some function with for in to go through my dictionary. I explain a little the code that I have here, I use selenium. Within Def Name() in variable nametag , I call "NameTag" of my dictionary. So s...
asked by 20.10.2017 / 21:47
1
answer

Dictionaries in Python vs Javascript Objects

I have a question as to whether the Dict in Python and the Object in Javascript are the same concept and since I consider that if they do the same. Example in Python nombres = {} nombres['Yoel'] = 1 nombres['Manolito'] = 2 nom...
asked by 20.09.2017 / 09:35