Questions tagged as 'python'

1
answer

Why does not my python code work?

import numpy as np import cv2 import time # Cargamos el vídeo camara = cv2.VideoCapture(0) # Inicializamos el primer frame a vacío. # Nos servirá para obtener el fondo fondo = None # Recorremos todos los frames while True: # Obtenemos el frame...
asked by 02.07.2017 / 00:16
1
answer

Use of "for x in range (n, m)"

I am designing a program in python to calculate the sum from n to m of i, and for this I am using "for x in range (n, m)". print("Este programa calcula la sumatoria desde n hasta m de i.\n\nA continuación ingrese los límites:") print("") n =...
asked by 26.09.2017 / 00:35
1
answer

how to correct error in sitanxis with column name in dataframe?

I am executing this code to delete some records of a dataframe, but in line 16 (move_id / id) it is the name of the column and / separates the name of the column which is not ideal. the error response is "move_id" does not exist and it is true x...
asked by 21.09.2018 / 17:08
1
answer

What does the from and the import serve?

I can not find a meaning that is useful for me to know when to use it I would like you to help me, since I need it for a subject at the university. In summary: Could you explain how and when to use the from and the import?     
asked by 07.10.2018 / 16:14
1
answer

Move files depending on their date in Python [closed]

How can I move / copy a file that contains ("YYMMDD file") to its respective folder that contains the name of the Month (January, February, etc.) in Python? Currently the date code is concatenated with a bday so that it only takes business da...
asked by 28.12.2018 / 01:13
3
answers

Modify characters in a chain [closed]

I have the following string 'POLYGON ((-58.612406970999984 -34.55196600599993, -58.61272573499997 -34.552244351999946, -58.611851334999983 -34.552907077999976, -58.611473561999958 -34.552566878999983, -58.612331868999945 -34.55191298799997, -5...
asked by 06.04.2018 / 18:54
2
answers

IDE to program Python? [closed]

Which IDEs recommend me to program Python in an organized manner and have their own compiler to test the program in there within the Software.     
asked by 29.04.2018 / 15:39
2
answers

Algorithm complexity

#Obtengo el indice del segundo valor que es >= Punto def terceraParte(inter,i,j,punto): if j == i+1: res = inter[j:] else: p = int((i+j)/2) if inter[p][1] > punto: res = terceraParte(inter,i,p,pun...
asked by 27.03.2018 / 18:46
1
answer

read numbers together in a txt?

I have the following list of numbers which are in a .txt: 6 28 12 3 10 22 26 7 10 I need the program to know that what it reads is a 28, 12 or 22 for example. to then put them on a list.     
asked by 04.11.2018 / 01:00
1
answer

can explain me the methods get_context_data and get_queryset [closed]

I would like to get an explanation explicit enough, the documentation with django is excellent but in some cases a bit confusing, I would like to know how to use both methods and a practical case if possible. Thanks     
asked by 24.04.2018 / 04:44