Questions tagged as 'python'

1
answer

Array scheduling in Python

I have problems trying to stagger an array 5x5 . First I caused a null line to go to the last line of the array (it worked), then I tried to make a line that had the highest index stay below the one with a smaller index, but on the line: if p...
asked by 14.10.2017 / 15:27
1
answer

numpy delete method doing strange thing

I was testing the delete method of the array class of the numpy library and something strange happened: I delete the index element 0 from the array, but the index element 1 is excluded. I am not understanding what this delete is doing >>...
asked by 16.10.2017 / 09:44
1
answer

Problem with reading files in python

What is the difference between making python open and reading a file, passing the reading result between blades? When I open a file that contains only the word test and I pass this result from the read by a hash algorithm the result is:...
asked by 09.09.2017 / 02:54
1
answer

Validation of login information does not work

Doubts are throughout the program import string alphabet = list(string.ascii_lowercase) n = range(0, 10) name = input('Digite seu nome de usuário:') if name in n: while True: print('Apenas letras são permitidas na nomeação do...
asked by 04.12.2017 / 20:27
1
answer

Transform columns into rows in a dataframe

I have a dataframe with columns: LUC Contrato Fantasia Ano Mes 01 02 03 05 ... 30 Tatividade I need to turn these columns with the days of the month into rows. In each column has the value sold that day by the store. It would have to look...
asked by 06.12.2017 / 02:03
2
answers

How do I import a jupyter notebook? or open?

I am not able to import or open the file of a notebook.ipynb I tried to go to the directory of the file at the prompt and type: jupyter notebook filename And it claims to me that the file is not found.     
asked by 02.09.2017 / 01:59
1
answer

How to give multiple prints in python in the same place of the terminal?

Having the following code as a base: for x in range(100): print("{}%".format (x)) How could it be done so that instead of each value appeared on a different line but instead replaced on the same line. Example in place of terminal: 1...
asked by 20.09.2017 / 13:30
1
answer

Get input by view

I have a form with inputs: email, first and last name. The email will always have a defined format, so I want to get the elements and have them automatically fill in the other fields, for example: User types email Email: [email protected]...
asked by 14.08.2017 / 13:57
1
answer

Decompose the value of a ballot in Python

I need to read an integer value and calculate the smallest number of possible banknotes in which the value can be decomposed. The grades considered are 100, 50, 20, 10, 5, 2 and 1. And dps print the read value and then the minimum amount of n...
asked by 12.08.2017 / 22:15
1
answer

Python - Path indication of a file for reading

I'm trying to establish the path to reading an excel table by xlrd . But I get an answer saying that C: can not be used . How to correctly set the path of the files to be used? import xlrd workbook = xlrd.open_workbook("C:\Users\rdmsouz...
asked by 11.08.2017 / 16:46