Questions tagged as 'python'

0
answers

I have problem with matrices in python

I have problems, I can not assign the complete data to the vector, it must be complete in the matrix and I could not, since I try to change the data type of the matrix, it does not give me. enter the description of the link here import...
asked by 18.03.2018 / 02:46
0
answers

Error executing a query in sqlite3 + crontab

I have a script made in python3 that makes scraping a web page and saves the info in a sqlite DB. To all this I have it mounted in a VPS. The problem is when I create a crontab so that the script runs every so often, when it runs and arrives at...
asked by 16.03.2018 / 03:51
0
answers

Duplicate records in psycopg2 and postgresql query

I ask for help, with this code that has been spinning around me for a while: def Liquidarnomina(): cur = conn.cursor(cursor_factory=RealDictCursor) cur.execute(""" select distinct id_Emp, (nombre1Emp||' '||nombre2Emp||' '||ape...
asked by 19.03.2018 / 18:37
0
answers

name 'cursor' is not defined.Python27

Hello, how I have a doubt which in the script I have, I defined the connection and the cursor but when running that code fragment gives me the error name 'cursor' is not defined. I hope to explain. In the first line of the function I make...
asked by 14.03.2018 / 03:28
0
answers

conditional according to previous panda column

I have a Panda DataFrame, and I want that according to the value of the previous column to execute a condition. that is, if the value of column A is equal to 1, execute enter conditional i if it is 0 not enter the conditional. A B C 1 1...
asked by 13.03.2018 / 22:58
1
answer

Doubt about an error

I'm getting into the topic of derivatives in python but recently I'm having an inconvenience, it turns out that when I enter the function I get the following error:    NameError Traceback (most recent call last)   ---- > 3 equation = eval...
asked by 14.03.2018 / 03:30
0
answers

Indicators, talib, how to use it with binance api?

def funciones(var, var1): #resta volumen nuevo menos volumen viejo volumen = float(var1[1]) - float(var[2]) #saca porcentaje del precio desde ke se lanzo el script preciopor = ((float(var1[0])/float(var[1]))*100)-100 #pasa porcentaje a 3 digitos...
asked by 28.03.2018 / 23:45
0
answers

Error python unpack requires a buffer

I'm working on a code to visualize audio however I face 2 problems. The first one an error that shows the following: The second is that as far as I could read it is more practical to convert the files to .wav to work with them, so I...
asked by 28.03.2018 / 23:29
0
answers

How to import the PyQt5 module in SublimeText?

I am using debian 9, install the PyQt5 from pip3 but when executing from SublimeText 3, for example, the following import PyQt5 print("\t _> Ejecucion Correcta") gives by mistake    Traceback (most recent call last):     File...
asked by 28.03.2018 / 23:41
0
answers

MySQL / Python - Reject queries if the database, table and column are not written within '(accent grave / backtick)

I would like to know if there is a way in which I can create restrictions when executing a query. What I would expect is that by having a query like the following: SELECT * FROM 'database'.'table' WHERE 'column' = 1; -- Notese los ' (acento gr...
asked by 12.03.2018 / 16:19