Questions tagged as 'python'

1
answer

SQLite duplicate registration

I was able to avoid duplicate registration of romaneio(nr_roman) , but I made several attempts to do the same with plaqueta(plaq) , so that if the nameplate already exists in the database, it persists in the nr request % of the plat...
asked by 16.07.2017 / 16:58
1
answer

Creating directories in Python

I have a list of directories to be created that have this structure: Bla / Bla / Bla1.md Bla / Bla / Bla2.md Blu / Blue.md Ble.md However, the .md files should not be created, but the folders that contain them should, and for that...
asked by 16.07.2017 / 04:56
1
answer

keep only the rows of a column with the value with Pandas

Hello, I am a beginner in the field and one of the exercises I am having difficulty responding to is the following. there is a multi-column file. In one of these columns, there are several zipcode (zipcode), and may or may not repeat. For eac...
asked by 18.07.2017 / 21:20
1
answer

function to return the integer

What am I doing wrong in my role? num2 = float(input("digite um número não inteiro: ")) def arrend(numero): if num2 - math.floor(num2) < 0.5: numero = math.floor(num2) return numero return math.ceil(num2) print("...
asked by 30.07.2017 / 01:38
1
answer

Parameter in the page URL

Sorry, I need to create a pyramid application to use the API . 1 - "/ quotes / < quote_number > "- Display page containing the quote returned by the API corresponding to < quote_number >. I already know how to create a statistical p...
asked by 10.09.2017 / 05:49
1
answer

Array and MIMEText - Python

Why can not I use Array to add inside a variable of type MIMEText (msg = MIMEText (body, 'html'))? I explain: for row in cursor.fetchall(): for owner in cursor.execute("select * from orcam where Ccusto=? and anomes=?", row.Ccusto, cdate...
asked by 12.09.2017 / 01:59
1
answer

Run file with kivy python

I'm doing a crud maintenance using python / kivy. There are four main files, one for P table, one for A, and one for C. The fourth main file is the main screen which will have three buttons for you to choose which table to edit and, when clicked...
asked by 20.06.2017 / 13:44
4
answers

Comparing list indexes in python?

Good afternoon guys, I'm having trouble with lists in python ... lateral = [] for i in range(3): lateral = float(input("Por favor, informe o valor de cada lado, seguidamente:" )) if(lateral[0] == lateral[1]) and...
asked by 20.07.2017 / 18:38
3
answers

Use return of a function in another function

I have a function in Python that receives a text and returns 2 lists, one with all the words that appear and the other returns the number of times each word appears. def frequencia(lista): conv = str(lista) plSeparadas = separa_palavra...
asked by 13.06.2017 / 13:36
1
answer

Text Processing in csv file

I have a database with more than a thousand reviews (text) in a csv file, however I need only texts that contain more than 5 words to be in my file. The problem is to make a code that scrolls the entire document line by line and leave only opini...
asked by 14.06.2017 / 01:38