Posts by Daymon Rebac • 27 points
10 posts
-
-1
votes2
answers2310
viewsA: Split a column into two from a parameter - Python
Localized solution: df['Campo1'], df['Campo2'] = df['Population'].str.split('/', 1). str del df[Population]
-
-1
votes2
answers2310
viewsQ: Split a column into two from a parameter - Python
I researched a solution but I can’t locate facing a data frame, just input lines for example. I HAVE A DATAFRAME WITH THE FOLLOWING FIELDS AND LINES: data = {'País': ['Bélgica', 'Índia', 'Brasil'],…
-
0
votes1
answer74
viewsQ: Result in a Python Dataframe
I have the following code: import numpy as np import pandas as pd import psutil as ps names = [] for service in ps.win_service_iter(): info = service.as_dict() listOf = [("Name:%s; "…
-
0
votes2
answers151
viewsA: Calling a service . py inside another . py
I found a way by exporting my other script as . py and calling it as library within the current script, example: try: import scriptantigo except Exception as e: print(e) In this way it worked!…
-
0
votes2
answers2259
viewsA: Format output Excel - Python
Yes, it has shapes, I usually format them like this: from win32com.client import Dispatch xl = Dispatch('Excel.Application') xlsPath = ('diretório do arquivo.xlxs') wb = xl.Workbooks.open(absPath)…
-
0
votes2
answers151
viewsQ: Calling a service . py inside another . py
Good afternoon, you guys! I researched a lot on the internet and did not succeed, I have the following problem to solve: I have 3 Python services installed on Windows(example1.py / example2.py /…
-
0
votes1
answer293
viewsA: Problems with win32com
SOLUTION! INCREDIBLE AS IT MAY SEEM: I could not believe how obscure this error was and we found the solution looking for similar problems with the equivalent code of . NET: To fix, create a folder…
-
0
votes1
answer293
viewsQ: Problems with win32com
I have the following error in my code, I’ve tried everything and I can’t fix: 1° Attempt - Unsuccessful excel = win32com.client.Dispatch("Excel.Application") wb =…
-
0
votes2
answers469
viewsA: Insert header in Python worksheet
I found how to make even much easier and practical than I thought: Ws.PageSetup.Centerheaderpicture.Filename = (r'C: Users daymon.rebac Routines IMAGES Excel Horizontal header.png')…
-
1
votes2
answers469
viewsQ: Insert header in Python worksheet
I need to insert an image into the header of the xlsx file that is generated by Python with a routine of capturing database data and turning it into report. I’m using this alternative method, where…