Questions tagged as 'python'

0
answers

Progress bar on Tkinter

I need to create a progress bar, because I have a small window in TKinter where I upload an excel file in a panda dataframe containing about 350,000 records and it takes a long time to load it, so I want to enter a progress bar in that time , bu...
asked by 09.12.2017 / 03:29
2
answers

Go through a list and return as many asterisks as indicated by the number entered

I have an exercise in which I am asked to create a "Histogram" from the data entered by keyboard and stored in a python list. For example, I enter some numbers by keyboard and add them to a python list: lista[4, 9, 7] . The prompt shoul...
asked by 09.12.2017 / 18:04
1
answer

Scrapy error is not recognized

I am trying to run a spider according to the " scrapy " library and when executing the command. scrapy runspider my_spider.py -o data.csv -t csv --set CLOSESPIDER_ITEMCOUNT=10 It signals me the following error    scrapy is not re...
asked by 14.12.2017 / 15:35
0
answers

Authenticate user and identify their role or group to which Django belongs

How do I authenticate a user with an email and password, and then log in to show him a menu according to the role or group he belongs to. Model.py from django.db import models from Apps.persona.models import Person from django.contrib.aut...
asked by 16.11.2017 / 23:00
1
answer

I need to get a title that is in an input. PYTHON web scraping

I need to get what it says on the title tag that is in an input: <div class="control-group" id="ApellidoDiv"> <label class="control-label" for="apellidos">Apellido<span class="requiredMarkApellidos"><font col...
asked by 24.11.2017 / 21:23
2
answers

How to convert data from a CSV file into python 3?

I am working on Python 3, when reading a .CSV file with several columns, of which the last 3 have numbers. When reading the file, all columns read them as strings and I want them to be int or float. How can I convert columns 5, 6 and 7 to int...
asked by 21.10.2017 / 01:51
1
answer

How to group data from a DataFrame by several columns at the same time?

I'm doing a downtime analysis of a production line. I have a DataFrame in CSV format with the following columns: 'index', 'id_planta', 'fecha', 'linea', 'turno', 'Supervisor', 'CategoriaTM', 'CausaTM', 'duracionTM' Only the durationTM...
asked by 24.10.2017 / 20:58
0
answers

Hello, I need help with a Qtableview control in python

I'm working with Python and Pyqt5 I get the data from a table in mysql in the Qtableview with the model but I can not add the value of one of the columns I get in the table. I need to assign it to the label text property. thanks self.model=...
asked by 20.10.2017 / 15:36
2
answers

How to compare 2 lists in python 3?

I'm working on Python 3.4, I have 2 lists: lista_1 = ['2017-10-01', '2017-10-02', '2017-10-03', '20107-10-04'] # Fechas de un periodo lista_2 = [['20107-10-01', campo2, campo3], ['2017-10-03', campo2, campo3], ['2017-10-04', campo2, campo3]]...
asked by 20.10.2017 / 19:24
1
answer

Print elegantly

I want to know how I should print the data on the screen so that it comes out in an "elegant" way, that is to say that each column is shown vertically ordered. I am using the following method: print("%s: %12i %25.2f "%(string,valor_int,valor_f...
asked by 03.12.2017 / 15:40