Questions tagged as 'python'

1
answer

How to change re address by default of login_required in Django?

I am using the login_required decorator to not allow the login without authenticating but I would like that when you enter a link without logging in, I redirect you to a specific page and not the default one that is account / login link     
asked by 29.10.2017 / 01:58
1
answer

Index group values in pandas (Python)

I would like to obtain the values separately from a dataframe that comes from a previous grouping: import numpy as np import pandas as pd import matplotlib.pyplot as plt mu, sigma = 0, 0.2 x = np.abs(np.random.normal(mu, sigma, 1000)) y = np....
asked by 06.11.2017 / 11:44
1
answer

Python global error handling

I want to know if there is any way to handle any type of error that appears in the browser so that within my function Connections (url) any object not found by the ccs_selector instead of cutting the program back to run from the beginning...
asked by 01.11.2017 / 21:43
1
answer

Get text entry tkinter

I want the text that I enter in the window entry, after clicking on start, I will return it in this variable: d = (Inventory_data.get ("Inventory_data")). get ("texto introducido") Code: ventana = Tk() ventana.geometry("500x300+100+100")...
asked by 09.10.2017 / 04:58
1
answer

Import values from a Dictionary to my Python variables

Inventory_data = {"Inventario_datos": {"Alti MW $ 2 |": {"Floor_price": '2.5', "Li_platform": 1, "Excel_name": "Alti MW $ 2.xlsx", "Li_Publisher": 2,...
asked by 06.10.2017 / 16:40
1
answer

Convert string to decimal number

Good evening, I am having problems converting the following string to a decimal number. I extract the number from a web and it comes with. instead of with, When trying to replace the. For the, the result is the following: x = ,,,,, repla...
asked by 06.10.2017 / 21:04
2
answers

Select sections of a list

If I have a list in Python: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] How can I make a selection of several sections of the list that are merged into another list? For example, select from position 0 to 2 ( ['a', 'b', 'c'] ) and fro...
asked by 26.09.2017 / 21:56
1
answer

python to exe, Selenium inside windows

I leave the full code of my program in Python 2.7 link I am looking for a couple of additions but I do not know in which way and with what programs I should do it. First of all, I need to convert it to executable.exe. On the other hand I...
asked by 01.11.2017 / 04:21
2
answers

problem to separate attributes by columns in .csv file

The program should read "a table" in python and then write it in a csv file, what I have until now is: What is above the main code are functions that simply serve to add names, ages and scores (I do not see it necessary to add it). ########...
asked by 01.11.2017 / 04:12
2
answers

Add the elements of two lists with lists

How can I add the elements of two lists. I have tried this but without success since it requires that the two lists have the same number of elements: lista1 = [1, 2, 3, 4, 5, 6] lista2 = [5, 6, 7, 8] lista3 = [] for i, w in enumerate(lista1)...
asked by 18.09.2017 / 01:11