Questions tagged as 'python'

1
answer

Insert a new column in dataframe equal to another column only without special characters

EX: [ Column reference x new column remove special characters in a new column using pandas dataframe]     
asked by 17.02.2018 / 23:18
3
answers

How to convert a string variable to int?

As I correctly declare an integer value, it is returning that my variables are strings . n1 = input("informe um número ") n2 = input("informe um número ") soma = n1 + n2 print ("O resultado da soma de ", soma)    report a number 25   r...
asked by 17.09.2015 / 22:52
1
answer

Problems with dictionaries and lists - python

Hello, I have the following dictionary. datas = {'records': [{'createdTime': '2018-02-20T21:56:20.288Z', 'fields': {'publicacao': '2018-01-22'}, 'id': 'rec1c1c8qyIkdwyMD'}, {'createdTime': '2018-02-20T21:56:20.288Z',...
asked by 20.02.2018 / 23:30
0
answers

Receiving data from a server in the console

Hello, as I am learning python and I entered this network area and exchange information, I would like to get some questions about the code I created trying to make a console interact with a server. Server Code: import socket import sqlite3...
asked by 20.02.2018 / 05:53
0
answers

lib not found: Pyinstaller

I'm trying to mount an executable, from a code in python through the Pyinstaller library. However when running the code by: C:\...>pyinstaller --name Aplicativo Aplicativo.pyw An amount of a large amount of .dll that is not localized is...
asked by 15.02.2018 / 23:52
1
answer

Randint does not generate random numbers the second time I use it

My randint when used the second time it does not generate new random numbers, it stays with the same numbers generated. I know in C when this happens I can use the srand (time (NULL)) , but in Python I'm not finding anything like it Show 3 d...
asked by 28.02.2018 / 20:07
0
answers

Heat map in Python

I was trying to make a heat map similar to this However,whenIruntheprogram,Igetonlyablankmap ForthisprojectIusedSpyder(pandasandgmplot)andthecodewasthis:importpandasaspdimportjsonimportosfrompandas.io.jsonimportjson_normalizemap_name='map'ma...
asked by 28.02.2018 / 20:34
1
answer

Python / Selenium is not filling the tilde character (~)

I'm trying to use Python / Selenium / Webdriver to automatically populate an input field on my Chrome page. However, I am not able to use the "send_keys" command to fill in the tilde character (~). Here's my code: import os import sys from...
asked by 15.02.2018 / 00:15
1
answer

Django's background color conditional fill admin

I'm wanting to coloris an entire row of a table, if its column in that row has some text, there are three possible situations: 1. the text itself, 2. fields with a "-", 3. fields with nothing. The reference column is a 9, field observation, and...
asked by 21.02.2018 / 14:50
0
answers

Training Dataset on Amazon S3

I'm building an image / object classifier with TensorFlow. It works perfectly, however I want to build the database using Amazon S3. I would like to know how to set image_dir to train my images using S3. In this case, when I test with loca...
asked by 14.02.2018 / 13:42