Questions tagged as 'python-3.x'

2
answers

Lower value in a matrix

I'm calculating the distance from a point to other points and I keep them in a matrix, how can I get the minimum value by taking the distance it contains, I should show that data found the distance the name and the address of the lowest value...
asked by 08.02.2018 / 15:47
1
answer

DataFrame.set_index has no effect

set_index does not work on Pandas DataFrame as indicated in the documentation. I'm using: Pandas version 0.20.3 Python version 3.6 I tried the example in the documentation: link import numpy as np import pandas as pd...
asked by 14.11.2017 / 23:25
1
answer

Input for a snake in Python

What I want is to create a snake and I would like to be able to detect which keys the user clicks on. I have a version made in C ++ in which the keystrokes are detected by a loop that is in another thread as I show here: vec2 dir(0,0); int ma...
asked by 20.12.2017 / 20:14
2
answers

Delete tildes in Python 3.6

enter the code here I am trying to delete the accents of a string I get when decrypting, looking in Google I found that to remove accents the unicodedata.normalize('NFD', string) method is used but when using it does not delete the accent...
asked by 26.03.2018 / 20:23
1
answer

Linear Regression and calculation of R2 for qualitative variable vs quantitative

I want to perform a linear regression in a data set of a landslide inventory. Each event has an area in square meters (the quantitative variable of my interest) and type of movement. The solution I have is to generate as many independent vari...
asked by 17.01.2018 / 01:19
1
answer

FileExistsError: [WinError 183] Unable to create a file that already exists

once the directory is created, when executing the code it gives the following error: How can I do so if that directory already exists, the function continues writing the file FileExistsError Traceback (most recent call last)  in ()       1...
asked by 04.11.2017 / 19:07
0
answers

Problem when pivoting a dataframe from two concatenated dataframes

Use Python 3.5 and Pandas 0.20.3 I get an error when I try to pivot a panda dataframe which I obtained using the concat function. I detail the process. This is my first dataframe. df = pd.DataFrame([ ['2017-01-03 21:00:00','2017-01-03...
asked by 05.11.2017 / 10:51
0
answers

Problems with inheritance in subclasses

I am having problems inheriting certain methods or attributes in subclasses of a given class. The problem arises when printing with the print to check if everything works correctly. But it seems that you are not inheriting variables defin...
asked by 27.10.2017 / 17:42
1
answer

Set up sizers correctly

I'll briefly comment on the problem: I would like to design a GUI that consists of a window of a given size (say 500x600 pixels) and inside it in descending order we would have two rows one under the other with a label and a text box (where t...
asked by 01.03.2018 / 16:15
1
answer

Print date and time in response to the user

I have the date and time format inside the Script, but I see myself in the problem of not being able to include it. As I would in another situation, entering a value within the impression of the message. I have the code in two ways: Form 1 :...
asked by 02.09.2017 / 02:39