Questions tagged as 'python'

1
answer

scraping horizontal and vertical web with scrapy

I'm new to scraping and I'm doing horizontal and vertical scraping with scrapy. at the moment of executing my code, it generates the .csv file but empty, without the scraped information. This is my code. Can someone tell me what's wrong? _auth...
asked by 26.05.2018 / 01:11
1
answer

sublime repl and python3, not configured. work in linux

use linux mint 18 sarah. my problem is that I do not know how to say sublime text when installing the package sublimeREPL that is installed in python 3 and not in python 2 because the latter is installed by default in linux but I want to use...
asked by 28.05.2018 / 16:51
1
answer

Read multiple lines in a file in python

Hello friends I am creating a file with functions in python and I need to make a function that can add the whole numbers that contain the lines that are inside the file, I have managed to make me only read the first line with the function fic...
asked by 25.05.2018 / 19:21
3
answers

Delete space between two print

How can I eliminate the space between 2 print different in Python? For example: num = raw_input() num = float(num) result="" while num>=1000: result+= "M" num = num - 1000 if num>=900: result+= "CM", num=num-900 if...
asked by 16.05.2018 / 23:49
1
answer

Placement in MultipleChoiceField template in Django

I'm doing a web page in Django and I want to introduce a MultipleChoiceField in a table. I want to introduce it in a personalized way, but when using the template code it does not give results. Here I leave the codes and the result. forms.p...
asked by 08.05.2018 / 08:59
1
answer

pandas python data management

I have a Dataframe with cities from io import StringIO import pandas as pd csv =StringIO(u'''\ city bogota manzanares guapi el paso momil valencia beltran Lima ''') and I want you to look for a list of the department that corresponds to th...
asked by 08.05.2018 / 22:10
1
answer

How to add elements from a matrix in python

I have to carry out a shipment management program, the program asks me to save the arrival of trucks, for it asks me to keep a truck that is numbered from 1 to 3 according to the type of truck 1 = tanker 2 = box 3 = platform and put the number o...
asked by 10.05.2018 / 14:03
1
answer

Count number of repetitions in pairs using pandas

A question recently , that did not specify with what language / technology I wanted to solve it, it impelled me to think how I would do it with Pandas. The question can be rephrased in the Pandas context as follows. Given a dataframe suc...
asked by 11.05.2018 / 17:17
1
answer

It does not show the images

I'm practicing with Python 2 and Tkinter, the problem is that when I try to add an image it does not appear. The code is this: image= tk.PhotoImage("1473185883EMBW_07.gif") image=image.subsample(1,1) label=tk.Label(image=image) label.place(...
asked by 16.05.2018 / 00:14
1
answer

Problems with the git push heroku master

Good as it is I hope that well, I am having problems to do a push to a project done in python using the django framework for heroku that can see it through this link link I get the following error:     
asked by 16.05.2018 / 14:30