Questions tagged as 'python'

1
answer

Error accessing localhost: 8000 / profile

page profiles.html <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8"> <title>ConnectedIn</title> </head> <body> <h1>Detalhe Perfil</h1> </body> </...
asked by 13.05.2018 / 22:05
1
answer

Error trying to encrypt with BCRYPT in Python

Code: import bcrypt hashed = bcrypt.hashpw('teste',bcrypt.gensalt()) error:    TypeError: Unicode-objects must be encoded before hashing When running the program, you have this error, how can I solve it?     
asked by 15.05.2018 / 21:15
1
answer

How to break a list into two separate lists to use in Gnuplot python?

A feature of online gnuplot allows you to place your data in two columns separated by space, and it understands how the "x" and "y" axes link I'm trying to use python gnuplot. Assuming it would be similar to the online feature, I put "#"...
asked by 17.06.2018 / 22:24
1
answer

For Python, what is the difference between pip x conda x anaconda

I'm learning python and saw that tutorials always appear for the tools: pip conda anaconda And I was in doubt what the practical difference between them?     
asked by 01.05.2018 / 17:52
1
answer

Convert monetary value (string) to Python / Pandas float

I'm reading a csv file where one of the columns has monetary values of '10, 000.00 ', the pandas is interpreting as a string. I wonder if I have to convert this into a race (iterating all the items in the column) or is there an easier way to...
asked by 03.05.2018 / 22:07
1
answer

list index out of range - From Fortran to Python

I wrote a program in Fortran and now I'm trying to write it in Python. However, it is giving an error:   (i + 1) = - u_med [i + 1] / (delta_r [i] * delta_r [i + 1])       IndexError: list index out of range I'm a beginner in Python, what...
asked by 23.04.2018 / 04:26
2
answers

How to invert a column in Python?

I would like to know how to flip the "Name, Last, Age" to "Age, First, Last" Followmycode:importpandasaspd#Importaabiblioteca"Python Data Analysis" df = pd.read_excel('Pasta1.xlsx') #Lê o arquivo xlsx df = df.drop('MiddleInitial', axis = 1) #...
asked by 17.04.2018 / 23:58
1
answer

How to leave the geckodriver fit for selenium use?

In Python 3 and Ubuntu, I want to run a test with selenium: from selenium import webdriver from selenium.webdriver.firefox.firefox_binary import FirefoxBinary from time import sleep binary = FirefoxBinary('/usr/lib/firefox/firefox') ff = web...
asked by 18.04.2018 / 18:16
1
answer

Pandas: How to make a Serial fragment in the field (Column) of the DataFrame

I have this excel below: NÚMERO "URL NÚMERO 16571 SICAN" "URL DECRETOS 2011 PRINCIPAL" 1 CCIVIL_03/Atos/decretos/1991/D00001.html CCIVIL_03/decreto/1990-1994/D0001.htm 4 CCIVIL_03/Atos/decretos/1889/D00004.html CCIVIL_03/dec...
asked by 10.06.2018 / 21:09
1
answer

How to customize matplotlib plots in a more cluster-oriented way?

I'm working with data clustering, I need to leave the data further away from the represented clusters in some other way, like a different symbol or some stronger color, I gave one analyzed in the documentation but I did not find anything of the...
asked by 10.06.2018 / 02:26