Questions tagged as 'python'

1
answer

How to mount a url in Django?

To learn Django, but one thing that I have not understood very well is how to set up a url, I know that it uses regular expression, but someone there has a way to explain it to me, p>     
asked by 28.01.2015 / 20:00
1
answer

Read rows and columns by Python, by excel

My question is if you have any resources so that I can read excel rows and columns. For example: I have experimental data in excel containing header in the first row having some 12 columns of data, then [1:12] it would only be the header, and so...
asked by 10.11.2015 / 18:10
2
answers

Read more than one .xls file in python

I asked a very similar question a few days ago, but this time, I'm trying to do something much more generic. I want to get the information from line 0 and 1. The code below is complete, and is outputting the input.xls file correctly. import xl...
asked by 25.09.2014 / 13:47
1
answer

Replace text BeautifulSoup

I have the following html: <p>Um acidente no cruzamento da rua ... </p> <div id="marca"></div> <p>Um acidente no cruzamento ......</p> <div id="marca2"></div> I'm trying to do this: def text...
asked by 30.08.2014 / 15:51
1
answer

How to decompile code from a python module using marshal

I'd like to get the bytecode of a module in Python and save it in a pyc with marshal. Example: abc test module t2 mod2 Then I import abc.test.module and would like to get the bytecode and thus save a pyc from it, from that...
asked by 10.03.2014 / 21:57
2
answers

Flask and its contexts

I'm new to desenvolvimento Web and I'm studying FLask and it has some objects that should only be manipulated in certain context like Flask.g and Flask.current_app what I can not understand are the differences between...
asked by 30.11.2018 / 21:46
2
answers

Lambda in Python - Doubt

In Python 3 study, what would be the lambda function in Python, what is it for and when is it used?     
asked by 10.12.2018 / 11:48
1
answer

Grouping of groupby pandas table

I have a table in this format User Material Nota 1 youtube 5 2 facebook 4 3 facebook 3 4 facebook 5 6 youtube 2 7 orkut 3 8 twitter 4 and would like to group so that in th...
asked by 17.07.2018 / 17:10
2
answers

Permutations and files

I'm working on a joke that involves permutations, to create a list of words, in several separate files. Problems start appearing when words with more than 4 letters are required, because the corresponding file becomes too heavy. What I wanted wa...
asked by 14.03.2015 / 10:15
1
answer

Merging function calculating wrongly

I'm trying to write a function in python that takes two vectors, deletes duplicates in the first and adds the corresponding data in the second. I mean trying to emulate the following MySQL query: SELECT 'Price', sum('Volume') FROM 'Dataset'...
asked by 19.03.2015 / 19:23