Questions tagged as 'python-3.x'

1
answer

How to convert a csv (unicode) file to csv (utf-8) in python 3.6.5?

I download a CSV (unicode) file from a website, the fields are separated by tabulation and in double quotation marks and the line break does not do it at the end of each row of how it looks in the CSV, example of how it is see the CSV informatio...
asked by 11.09.2018 / 08:04
1
answer

Create column from another column in which each row indicates the column to use to obtain that cell

I have the following information in a DataFrame in Python: ## x1 x2 x3 x4 x5 colum ##0 206 214 021 122 554 2 ##1 226 234 123 456 789 4 ##2 245 253 558 855 123 5 ##3 265 272 000 111 222 4 ##4 28...
asked by 12.09.2018 / 12:36
1
answer

Problem with basic function

Hi I am starting in Python and I have a problem with an exercise of a function that at first seems very basic, but I do not understand why it does not return what corresponds. Basically what you are looking for is to invest a chain, and for that...
asked by 18.08.2018 / 14:53
1
answer

change the image the index of a stakedWidget using a QcomboBox

Good evening I have the following code: from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5 import uic from PyQt5.QtCore import Qt from tabla import tabla_style class Principal(QMainWindow): def __init__(self): QMainW...
asked by 02.09.2018 / 04:30
1
answer

Is there any other way to make a Bubble Sort without defining it?

In Python3, when you search how to make a bubble sort, find something like this def bubbleSort(alist): for passnum in range(len(alist)-1,0,-1): for i in range(passnum): if alist[i]>alist[i+1]: temp =...
asked by 31.07.2018 / 19:26
1
answer

Create an executable from a python script (NumPy)

Sorry that seems like a very simple doubt, but it is the first time that I do this and I am having difficulties. I have created with spyder, a software that brings anaconda, a calculator of systems of equations, in which I have used the numpy mo...
asked by 07.05.2018 / 21:38
1
answer

Go through 2 positions per iteration FOR

Good, our first for runs 16 positions in this case and we want that both padre as punto have the same value for each 2 positions (That is, for i=0 and i=1 the same value, for i=2 and i=3 other ....)....
asked by 15.08.2017 / 20:52
1
answer

compile in sublimeText 3 python code activating a cmd window

Maybe my question is not the most accurate but good to explain create a new build system { "cmd": ["start", "cmd", "/k", "C:/Users/Jsociety/AppData/Local/Programs/Python/Python36/python.exe", "$file"], "selector": "source.python", "shell": tru...
asked by 08.02.2018 / 07:15
1
answer

How to solve a combinatorial problem, preferably in python?

Today I come to pose a problem, more of algorithm than of language. I need to get to generate one, several, or all the possible combinations of 25 elements, (or I would even be satisfied with at least one combination with as many elements as pos...
asked by 31.05.2017 / 18:44
1
answer

How not to detect upper case in Python 3.5

I've done a program in Python 3.5 to ask myself words. But I have a problem: dictionary = {} numpal = int(input("Cuantas palabras quieres que te pregunte?: ")) if numpal<=0: print("El numero de palabras tiene que ser mayor que 0.")...
asked by 23.01.2017 / 12:01