Posts by Saulo • 175 points
13 posts
-
4
votes1
answer61
viewsQ: Date count of days when it has turn of year
I’m having trouble generating an iteration where dates are displayed from a given day to the most current day. this problem happens when it has the "turn of the year" and I put a condition of…
-
0
votes1
answer69
viewsQ: Create multiple Dataframes through iteration
Is it possible to create multiple Dataframes within an iteration? I need to do this feat, follow the example: in the NUM iteration, it has numbers from 0 to 9, total 10 numbers. in the for nn in…
-
3
votes1
answer65
viewsQ: Replace strings with list elements
# Código list = [a for a in range(100,103)] df = pd.DataFrame({ "A":['x','y','z'], "B":[0,1,2], "C":[0,0,0] }) I need to replace column strings C by the strings of list, so that the first string of…
-
0
votes1
answer59
viewsA: Python XML query not retouched
Error: AttributeError Traceback (most recent call last) <ipython-input-86-55318317991e> in <module> 6 NumeroSequencial2 = [] 7 for infoss in root: ----> 8…
-
-1
votes1
answer59
viewsQ: Python XML query not retouched
I want to make a query that returns the value ['1961'], in the case of "CONSULTATION 2". As the file has several lines, I specified a piece of the XML file. Use this same query "QUERY 2" on other…
-
1
votes2
answers231
viewsA: download with requests and open python
thanks again @lmonferrari The solution: a = re.findall(r'filename=(.*)', zip.headers['content-disposition']): arq = "".join(a) with open('C:/teste/' + arq, 'wb') as teste: teste.write(zip.content)…
-
1
votes2
answers231
viewsQ: download with requests and open python
The following code is part of a loop that will download multiple files and save to their respective directories. I’m trying to download the file from the "url" and want to save in a directory of…
-
3
votes1
answer129
viewsQ: Concatenate large python csv files
I am trying to concatenate files that reach a sum of 650MB, and is returning memory error: > MemoryError: Unable to allocate 70.3 MiB for an array with shape (3, 6143249) and data type object…
-
1
votes1
answer29
viewsQ: column insertion via python series
I have a series collected from a column of dataframe. I need to create columns with each of this series. For example: serie = [] for s in serie: df.insert(loc=0,column=serie,value='int') columns: A…
-
1
votes2
answers189
viewsQ: filter dataframe by python line
Hello, I own this Dataframe with hundreds of thousands of lines, I want to filter so that selection is only the desired lines, in case more current lines, follow an example of what I want: the…
-
0
votes2
answers392
viewsA: concatenate python csv files
Thank you Paulo Marques, follow the code that solved my problem, it was laborious but it was worth it # Concatenar import pandas as pd import glob listas = ['dfp','itr'] tipos = ['bpa','bpp'] path =…
-
-2
votes2
answers392
viewsQ: concatenate python csv files
3 lists that form the directory and the file name, I want to concatenate the files "lists_tipos_anos.csv" (around 44 files) in "lists_tipos_all.csv" (generate 4 files), where the "all" is all the…
-
1
votes0
answers30
viewsQ: create a new dataframe with another
I have a dataframe with (1242 Rows 325 Columns) of it I make a correlation ". Corr()" which results in (325 Rows 325 Columns) this code shows me the 15 smallest correlations of the lowest value for…