Questions tagged as 'python'

3
answers

Delete values from a list of lists

How can I eliminate the double values that appear in some lists? def selection_and_reproduction(poblacionNueva): puntuados = [ [calcularFitness(i), i] for i in poblacionNueva] #Calcula el fitness de cada individuo, y lo guarda en pares ordena...
asked by 04.08.2017 / 18:36
1
answer

Change value shown by axes

I have an image in python that I graphic with the following code: from PIL import Image plt.figure() im = Image.open('background.png') extent = Deg2meters([11.0,12.5],[54,54.75], ref).T extent = np.delete(extent, np.s_[2], axis=1) extentlist...
asked by 14.07.2017 / 11:22
1
answer

Web Forms with Python

He has asked me to automate a load of some records in a SQL database, with id, cedula, departamento y tipo de pago with Python. I have researched and found a framework called Flask, apparently it is simpler, but I have not managed to d...
asked by 07.09.2017 / 17:11
1
answer

How can I send push notifications from python?

I'm trying to make a program that communicates with Firebase and this sends push notifications to a single device on Android, I've been able to send notifications from Firebase but not from a Python program. push_service = FCMNotification(api_...
asked by 06.03.2018 / 16:26
1
answer

Environment variables

I need to create an environment variable to share information between two Python scripts. Let me explain, I have created three scripts in Python to check the operation or rather verify that the environment variable is created. These files are...
asked by 03.03.2018 / 23:49
1
answer

Error: Invalid index to scalar value

This is my workflow. I try to filter my data y and z to eliminate the nan values. I can not fix the Invalid index error. data = logs[['DEPT','NPHI', 'RT' ]] x = data ['DEPT'] y = data ['NPHI'] z = data['RT'] DEPT_inv = sp.sum(sp...
asked by 30.06.2017 / 16:48
1
answer

Help with Qt creator, does not allow to run projects?

I have installed the qt creator several times but it had never cost me as much as in my current pc; first I used the installer that I always had in my pendrive (the one of qt 5.8), it told me that I could not download certain repositories, I...
asked by 30.06.2017 / 05:23
1
answer

Convert datetime column dataframe

Good morning, My script reads a csv with various columns. In the pandas function read_csv reads: data = pd.read_csv(filepath, index_col='Target', parse_dates=True, infer_datetime_format=True) The dataframe looks like...
asked by 21.06.2017 / 10:09
1
answer

How to transform a sql output into a SFrame?

I have an output of an SQL query in this way: [{'count': 8L, 'subscriber_id': 54, 'eclipse_id': 11294}, {'count': 1L, 'subscriber_id': 54, 'eclipse_id': 11243}, {'count': 1L, 'subscriber_id': 54, 'eclipse_id': 11295}, {'count': 1L, 'subscriber...
asked by 22.06.2017 / 15:13
1
answer

How to call xml while in the Lib \ xml folder?

Doing an exercise that starts with the following code: import xml.etree.ElementTree as ET tells me when executing it that it can not find the module.    Traceback (most recent call last):       File "C: \ Python27 \ xml1.py", line 1, in...
asked by 21.06.2017 / 12:58