Questions tagged as 'python'

1
answer

Show only repeated elements with Pandas

Suppose I have a list in .csv with different columns, one of them is "teacher name", the second "subject" and the third is "year". There may be something similar to this: Nombre profesor Asignatura Año Juan Mates 2002...
asked by 15.11.2018 / 22:56
3
answers

Working with parameters of a table using Pandas

I have a .csv file that contains this type of data: Nombre Curso Nota Miguel Primero 8 Juan Primer 2 Pedro Segundo 6 Luisa Primero 6 Teresa Primero 3 Pepe Segundo 5 Ana Segundo 6 Natalia Se...
asked by 14.11.2018 / 13:58
1
answer

Doubt about float and int

I have a program that reads me file data excel and csv and writes them in txt . The problem I have is that one of the columns that he reads are decimals and when writing them he puts them all as decimal. The issue is that I j...
asked by 15.01.2018 / 12:28
1
answer

Associative lists in Python?

In Python, from what I understand, the closest thing to arrays are the listas and the tuples . I would like to know if there is any way that at least, by entering a new datum in a list, you can give it a name, as if it were an assoc...
asked by 01.01.2018 / 16:13
2
answers

Search for words in quotation marks

I need to take the word and the two bold numbers of a string to pass it to an array so I can select it later. I've thought about regular expressions in python using the re class but I can not find the form ('{"id": 192, "result": [" on ", " 5...
asked by 28.12.2017 / 19:43
2
answers

.py a .exe Python

I'm trying to make an .exe with a .py file. I read the tutorial link and it worked perfectly. My problem is when instead of making a code as easy as the tutorial print "Hello world" I place functions such as: def main(): a = 14...
asked by 13.12.2017 / 04:54
2
answers

Import python modules from another directory

I was looking for all the internet, I tried all the possible ways and I still can not import the module that I need. The tree of my project is this: code ├── folder1 │ ├── subfolder 1 │ ├── file1.py (file to be imported) │── folder2 │ └─...
asked by 20.01.2018 / 04:43
1
answer

Shoot python scripts with the Ubuntu console

Good morning, I am working in Python on Ubuntu , I need to create an application that executes various actions through common console commands without calling the python3 entity. for example: user@usuario-de-ubuntu:~$...
asked by 07.12.2017 / 19:58
1
answer

Get a list with the contents of a column of a csv file

I'm looking to access all the values in the ddomain field in my list and create another new list with those values. I think that with a for item in your_list it could be done but I can not find the form. with open("Top20_Media_10...
asked by 11.12.2017 / 19:07
1
answer

Matplotlib Python Values in X axis

With the following code I want you to show me a couple of other things. I want you to show me on the x axis from 0 to 23 that are the amount of data per day that there is and only shows me now 0,5,10,15 and 20. On the other hand I want that in e...
asked by 05.12.2017 / 16:00