Questions tagged as 'python-3.x'

1
answer

Average cycle with pandas

Good I have the following df , the question is that I need to filter the speeds per hour and with these take an average, I am utlizando the following code: import pandas as pd import numpy as np df = pd.read_csv('df.csv') b = df[(d...
asked by 30.04.2018 / 22:50
1
answer

The url in Django is superimposed

I have an app with a product loading form for books (Product, Date of publication, file) After loading it generates its own url ( link ) But when selecting to see all the images, I get the following error: verimagenes.html {% extend...
asked by 27.04.2018 / 05:54
1
answer

Error installing BeautifoulSoup using pip

I'm trying to install the BeautifulSoup library with pip for Python 3.6: $ pip install beautifulSoup But he throws me an error: (myvenv) eduardorr21@eduardoreyes21 ~/Documents/WebScraping $ pip install beautifulSoup beautifulSoup...
asked by 08.04.2018 / 08:23
1
answer

How to create dynamic inputs with Django?

I am making a form to add many products to the same collection and I want the collection form to create the collection with an unlimited list of products. My form is this: class TendenciaForm(forms.ModelForm): class Meta: model...
asked by 16.04.2018 / 13:31
1
answer

Script with docx-python does not save the new file

I have the following problem, I have the following code which is responsible for sending the data to the imprimir_ticket module: from es import imprimir_ticket def productos(self): lista_01 = [] pago = self.Cantidad.text()...
asked by 19.08.2018 / 22:54
1
answer

How to login with mail in Django?

I am trying to make a login in Django and I have seen that by default I can only log in with the username and password but due to the demands of my client it wants to be able to login with the email apart from the username. I have created a f...
asked by 28.03.2018 / 17:05
2
answers

Geometric Data

I'm calculating the geometric data from the latitude / longitude.    link consultaGeom = ('''select geometry::STGeomFromText('point('+left(?,12)+' '+left(?,12)+')' , 4326)'''); param = (latCIE,lngCIE) qu...
asked by 07.03.2018 / 15:57
1
answer

How to refer to a div that contains this tag? [BeautifulSoup4]

I am practicing web scrapping and I would like to know how to refer to the div element of the page that I am scrapping that contains the following property <div style="color:#000000; padding-left:55px; padding-bottom:1px; background image:u...
asked by 27.02.2018 / 04:44
1
answer

SyntaxError: Generator expression must be parenthesized if not sole argument

I would like to combine a de-structuring with a python map to process pairs of columns in a data list. My ideal solution would be something like def openOrSenior(data): return list(map(lambda [age, handicap]: 'Senior' if (age>54 and ha...
asked by 02.03.2018 / 15:21
1
answer

Event hover in pyqt5

I would like to know how I can generate a Hover event in the bclose button of the following code so that when the mouse is over it changes its color, for example: This is my code: import sys from PyQt5.QtWidgets import * from PyQt5.QtGui...
asked by 20.03.2018 / 05:10