Questions tagged as 'python'

0
answers

Mark this bug with the pickle in Python 2.7

I have this problem running my script I stress that I am using the python 2.7, I would like to see if you can help me     
asked by 14.11.2018 / 08:51
1
answer

Dictionary in dictionaries

I have a dictionary that in turn contains dictionaries that look something like this: variable={'query': {'query_string': {'query': 'E.keyword: {sustituir_0}'}}} The idea is to create a function that obtains the keys of each dictionary and...
asked by 22.10.2018 / 12:37
0
answers

How to know if the value of a column is inside a list that I have?

Good, I have the following list: milista = [' 5093', ' 5243', ' 5390', ' 5753', ' 5818', ' 5961', ' 5966', ' 6016', ' 6256'] How can I know if my column.value == any element of a milist: import openpyxl doc = openpyxl.load_workbook("archi...
asked by 21.10.2018 / 21:44
0
answers

Error with UCS-2, when browsing web page with python and selenium

I have this error when going through the page getting links, everything goes ok until it reaches this title W️Warning Games, as I could do so that I do not mark error that is because of the yellow sign. This is the error that I get:    Traceb...
asked by 18.09.2018 / 04:09
0
answers

help with accumulator pattern python 3, my output is not what I wanted? [closed]

suma=0 for ex in range (1, 11): nuevo_balance=300 suma += nuevo_balance print ('persona numero',ex,'tiene',nuevo_balance ,'$' ) What I want is that in the output person 1 have 300 and the second 600 and the third 900 and so on. OU...
asked by 04.10.2018 / 05:32
1
answer

Save several DataFrames with a for loop in different sheets of the same excel file

I would appreciate your help, I have the following code: for embalse in ["PIL", "PUL", "VDV"]: vo = pd.read_csv('...\Desktop\pucv.xlsx',encoding='utf-8') vo=vo[vo["Embalse"]==embalse] writer = ExcelWriter('...\Desktop\embalses.xlsx...
asked by 11.09.2018 / 22:26
1
answer

Validate form fields in django verifying their existence in the database

How to validate fields of a form in django by consulting its existence in the database (eg: the ID of a record)     
asked by 12.09.2018 / 17:08
1
answer

_tkinter.TclError: bad listbox index "": must be active, anchor, end, @ x, y, or a number

Hello everyone I am currently trying to insert x amount of Listboxes in each Frame of a Notebook, depending on the number of elements in a dictionary and all this from a for loop, now I have created a function for me to print the name of the sel...
asked by 19.09.2018 / 17:43
0
answers

Error importing "ValueError: Attempted relative import in non-package" PYTHON

I'm a bit of a rookie even in Python, since I'm starting his apprenticeship. I have encountered a problem when it comes to doing a fairly basic "import". I have searched for information on Google, but I do not understand the solutions I have see...
asked by 04.10.2018 / 19:51
0
answers

How to calculate the percentage in a Python calculator with the eval function?

I have written a calculator in python with PyQt5 and so far all the operations are performed correctly minus the percentage, for the evaluation of data I use eval, I appreciate your help. The code used is the following: import sys, math from...
asked by 04.09.2018 / 06:41