Questions tagged as 'python'

1
answer

In Python django, if I want the regex to detect from 6 characters to infinity, [\ w -] {6, infinite} what is the quantifier?

url(r'^(?P<foo>[\w-]{6, })/$', view) In django if I want the regex to detect from 6 characters to infinity, {6, infinito} , do I leave it blank, or how should I express it? This way it works but I'm not sure ...     
asked by 07.02.2017 / 04:30
2
answers

Load different URLs without closing the browser

Through this code, I load different URLs in the browser to extract the source, but I close the browser after each reading, can I reload with the following URL in the list? from selenium import webdriver from bs4 import BeautifulSoup delFicher...
asked by 03.08.2017 / 14:53
1
answer

Simplify a heavy document (1 GB)

I'm dealing with a Geoide model, specifically the EGM2008 : This file contains the Geoid undulation (in meters) with respect to the ellipsoid WGS84, with a mesh pitch of 2.5 '(minutes) Occupy 1.28 GB Example of the file | LAT...
asked by 06.10.2017 / 16:22
1
answer

Filter data when loading CSV using Pandas in Python 3.x

I am uploading very large CSV files where there is information that I do not use. What I do now is go to lists and then fit with conditions. For example, in a column I have "A" and "B" but I only want those rows that have "A", so I filter the...
asked by 22.08.2017 / 14:56
1
answer

How can I avoid repeating the same buttons?

I am developing an application with Python, using the graphic library tkinter . Question I created a button with tkinter and I link it to a function that unfolds 3 more buttons If I press the same button again, there are 3 buttons and t...
asked by 29.08.2016 / 09:33
1
answer

How can I reuse the django permissions in django rest framework?

I have already asked this question and it can be a song but I hope that someone will help me, I am currently doing a project with django restframework, in which I will have two groups (Teachers, Students, School) and these already have their per...
asked by 24.05.2016 / 00:24
1
answer

Problems migrating project in Django 1.6 to Django 1.7 version

I have serious problems to make my project work in a newer version of Django (from 1.6 to 1.7) I am working with a virtual environment in which to reinstall all the applications of my project (from my requirements.txt file), except the versio...
asked by 20.05.2016 / 03:25
1
answer

Django REST Multiple Models (base_name & queryset) error

I am trying to use the Django REST Multiple Models and I have created the models and the viewset. But when trying to enter the url of the api, I get an error: link    'base_name' argument not specified, and could not automatically   dete...
asked by 24.05.2016 / 10:50
1
answer

Multiple filtering Django Rest Framework

I wanted to do a multiple filtering by url with the API Django Rest Framework that is to say that for example type www.domain.com/clientes/Nike/ES and return me all Nike customers from Spain, the thing is that I do not know how to cross the...
asked by 19.05.2016 / 11:02
3
answers

How to iterate in a dataframe for a certain number of rows?

I have the following dataframe: import pandas as pd import numpy as np data = pd.date_range('20180101', periods=300) df = pd.DataFrame(np.random.randn(300, 5), index=data, columns=['open', 'high', 'low', 'close', 'volume']) I...
asked by 27.12.2018 / 14:54