Questions tagged as 'python'

1
answer

Problems with Many2many odoo

I have a big question: I created 2 models: status = [(1,'Vigente'),(2,'Caducado')] class DateOfert(models.Model): _name = 'date.ofert' ofert_status = fields.Selection(status , string='Estatus Comercial') date_i = fields.Date(st...
asked by 29.06.2018 / 14:56
1
answer

jupyter --InternalError: (pymysql.err.InternalError) (1054, "Unknown column 'index' in 'field list'")

I have a code in jupyter that what I want to do is insert the bd, it works well with the example that I have commented, but when doing it with the real csv, I deployed an error. import pandas as pd df = pd.read_csv('4763.csv',header=[2...
asked by 26.06.2018 / 19:07
0
answers

LogFile in Spyder-Python

I have a program that I wish every time it is run generates a log file, that is, a file that contains the trace of the events at the time of execution of the program. The report that fulfills all these characteristics in spyder-python, is the...
asked by 25.06.2018 / 09:44
0
answers

Problem passing a base64 image over HTTP POST in Python

I tell you, I have the following problem: I have a WebService in C # where one of the parameters that I have to pass is a string (the image converted to base64string) I really do not know why the base64 string is not being stored correctly...
asked by 23.06.2018 / 04:13
0
answers

Retrieve record in a DATATABLE to be able to edit it - Django

I have a form in which the following data is recorded: ORIGEN , CANTIDAD , DEFECTO , COMPONENTE , COMENTARIO and% DATATABLE a ITEM is selected. Once the information is captured, the record is saved...
asked by 16.07.2018 / 21:20
0
answers

Error in formula of volatility with pandas

Good: I have these two lines of code where I want to calculate the returns of an action and the volatility of the action. GFG['Log_Ret'] = np.log(GFG['Close'] / GFG['Close'].shift(1)) GFG['Volatility'] = pd.rolling_std(GFG['Log_Ret'], window=...
asked by 26.06.2018 / 13:30
1
answer

Detect date change using datetime

I'm looking for a way to make an "Automatic Money Adder"; for example; I get up one day, I turn on the pc and automatically add $ 10 to a file. My problem is part of a code to determine that today is not the same as yesterday and do not add it...
asked by 24.06.2018 / 05:24
1
answer

How to operate data in pyhon and sql server

My question may be quite simple. I need to make a sum of a column from my database. The problem is that (the way I do it), it brings me the data as rows and not as int. How do I get a data from the database as it is? Example: def prueba():...
asked by 20.06.2018 / 23:54
1
answer

How to restart a python program in raspberry automatically?

Very good everyone, I have a python program running on raspberry pi 3 that uses request to communicate with a web script and I want to know if in case the raspberry program crashes, there is a way to know if it hangs and if you can rerun the pro...
asked by 20.06.2018 / 21:34
1
answer

Specific query in Firebase with python

I'm trying to integrate firebase with my python project. Using firebase cloud. I want to get a result like the following:    Name: xxxxx Surname: xxxxxxx Address: xxxxxxx To do this, use the following code to perform the query. impo...
asked by 03.07.2018 / 16:39