Questions tagged as 'python-3.x'

1
answer

Define in which quartile values of a column are found

From a column that contains different numerical values called 'col6' I want to know for each sample in which quartile it is. To represent it I want to have 4 columns and do it in a binary way. What I had thought is to create 4 columns o...
asked by 14.12.2018 / 13:51
2
answers

Cycle problem in Python

I have this approach:    Read 10 whole numbers, store them in a list and determine   how many numbers of those stored in that list end in 15 I have this code, but I do not know where it is that I am wrong; For more than I look, I do not k...
asked by 06.10.2018 / 18:45
1
answer

IndexError: list assignment index out of range with lists and input (). split ()

I'm trying to make a program in which the user has to enter a character and then assign it the value, and I want the character and value to be on the same line separated by a space, so I'm using input () .split () to separate it into 2 different...
asked by 06.10.2018 / 03:22
1
answer

Filter by fields of the same model

I need to know how I can filter in a model that is an Invoice where I have two fields to pay and another that is paid, I have to do a filter to get the bills that have different amounts than paid to know which of the bills are unpaid. class Fa...
asked by 29.08.2018 / 15:16
1
answer

Can parameters be passed to a function its own return value?

Hi, I'm trying to do a filter but I need the filter output data to go through the N times filter again, until I get the data I'm looking for. But can this be done in python? I need to do it with the use of calls to a filter function determined b...
asked by 07.07.2018 / 01:59
1
answer

Access data in a tuple

I have the following code: import firebase_admin from firebase_admin import credentials from firebase_admin import db cred = credentials.Certificate("2.json") firebase_admin.initialize_app(cred,{ 'databaseURL':'https://new1-3b819.firebase...
asked by 12.07.2018 / 18:46
1
answer

QFrame without mosaic and centered

I have the following code: from PyQt5 import QtCore, QtWidgets, uic from functools import partial class MainWindow(QtWidgets.QMainWindow): def __init__(self, parent=None): super(MainWindow, self).__init__(parent) uic.loa...
asked by 12.07.2018 / 19:32
1
answer

Delete a selected row in a QTableWidget

I have the following problem: I try to delete a selected row of a TableWidget but it does not work. This is the function I occupy: self.check.clicked.connect(lambda:self.tabla.selectedItems().clear()) And this is the complete code:...
asked by 17.07.2018 / 21:32
1
answer

key.pressEvent (), does not execute the indicated task

I would like to know how I can execute a function by pressing the enter key, in a specific widget. For this case, I am trying to execute a function at the moment of pressing enter in the qlineedit. but it does not answer this is the image of...
asked by 27.07.2018 / 05:59
2
answers

How to use spaces instead of tabs in vim?

I program in python with VIM 8, and I have this doubt, I read that in PEP8 it is recommended that the indentations for python must be of 4 SPACES, in my .vimrc I have this configured by a recommendation of a Youtube video: set shiftwidth=4 set...
asked by 21.08.2018 / 02:29