Posts by Valter Santos • 51 points
7 posts
-
0
votes3
answers384
viewsA: Download spreadsheet with Openpyxl
a possible solution is you set the location where you want to save your file. follows an example I hope I can help you. from openpyxl import Workbook wb = Workbook() ws = wb.create_sheet('Dados')…
-
0
votes1
answer41
viewsA: How to get Polygon coordinates from a python city?
Use the library geopandas, download the shapefile of Brazil or the state in question can be here NEREUS and then open the file . shp br = gpd.read_file('gadm36_BRA_1.shp') You will get a…
pythonanswered Valter Santos 51 -
1
votes2
answers128
viewsA: Change the save location of a Python PDF (pdf.save())
just include the path in the file name setting: pdf = canvas.Canvas("C:/Users/seu_usuario/Área de Trabalho/vendas_produtos.pdf")
pythonanswered Valter Santos 51 -
0
votes2
answers489
viewsA: Compare two Dataframe and create a new Dataframe
very good your question, because at any time we may need to do this procedure on this link I believe I already have the solution: Compare two Dataframes and output their Differences side-by-side And…
-
0
votes1
answer132
viewsA: How to handle "Nan" values returned from a Dataframe
Hello, maybe you should wear: dfs=pd.concat([df1,df2], axis=1) instead of: df=df1+df2
-
1
votes2
answers85
viewsA: Performance testing, how to reduce running time
Hello, regarding time reduction try to use: from collections import deque lista =deque([x for x in range(100)]) I got a slight reduction in execution time. Here…
pythonanswered Valter Santos 51 -
0
votes5
answers842
viewsA: Find a file type within several folders and save the hierarchy
Hello, when I need to access my 'xlsx' files in the directory, I use the code below, maybe it is not what you want but it is already a light... import os # vendo a lista de arquivos no diretorio…
pythonanswered Valter Santos 51