Questions tagged as 'python'

1
answer

"isdigit ()" with 0.00 not working

Why does the isdigit() method not identify that 0.00 is a digit? I'm working with a few million data and certain records have values of type 0.0000001 or 0.00 . When I try to convert 0.0000001 to Decimal ,...
asked by 30.01.2018 / 17:24
1
answer

Error: "Maximum recursion depth exceeded while calling a Python object"

class Ponto(object): def __init__(self, x): self.x = x @property def x(self): return self.x @x.setter def x(self, valor): self.x = valor When I run the script it generates: Traceback (most recent...
asked by 18.10.2017 / 05:23
1
answer

Create a dictionary from a list

I have the following list: msg = ['CAD400','Uma Filial...','Solucao:','O campo...','','LIB310','A Filial...','Solucao:','Foi identificado...','Foi corrigido...','','PAG302','Mudanca...','Solucao:','O erro...','O programa...','Programa alterado...
asked by 18.10.2017 / 04:41
1
answer

How to write a .csv file in Python including file definitions?

How can I create a csv file containing column width information and configured header and stuff like that, is it possible? or can we just write the data without any configuration?     
asked by 24.01.2018 / 14:15
2
answers

Group name in same group

I have a sales table with sellers name, products, and other information imported from a xlsx worksheet. But it turns out that the names of sellers are repeated according to sales, for example: João - Venda de produto A Marco - Venda de p...
asked by 25.01.2018 / 17:09
1
answer

Select data from a worksheet

I read data from a spreadsheet using Python 3 libraries (xlrd / xlsxwriter / Pandas and Numpy). This worksheet has in the lines questions of the survey and in the columns the areas that answered the survey. Each sentence has a note, ranging from...
asked by 24.11.2017 / 01:02
1
answer

Command to end the program

There is a command to terminate the program in Python or you can just end it by using ways like this: print()     
asked by 21.11.2017 / 17:27
2
answers

Doubt in script logic

Well, I was wondering why number 2 is not the first one to be printed in this script, I'm not understanding logic. altura = 5 linha = 1 while linha <= altura: print ('1', end = '') coluna = 2 while coluna < altura:...
asked by 21.06.2018 / 18:10
2
answers

How to write user input in python files?

I am a beginner in python and am doing an exercise that asks me to create a simple database in a .txt file that allows the user to register and query products and their values in reais, without having to access the file (open , but does not show...
asked by 17.08.2017 / 02:26
1
answer

Square Matrix in Python 3

My code is printing spaces at the beginning and end of the line, and it is giving presentation error (question 1557 URI) Does anyone have a good tip? "The values of the arrays must be formatted in a field of T size justified to the right and sep...
asked by 11.11.2017 / 14:28