Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Carpenter learning python
Post: RE: Carpenter learning python
I remember, there is a German programme called SEMA for constructing rooves, or generally for wooden constructions.
Fantastic programme!
Look here.
I dabbled with it, just out of interest, same as ... |
|
Pedroski55 |
General Coding Help |
11 |
715 |
Dec-23-2022, 12:52 AM |
|
|
Thread: Summing up set elements(HH:MM:SS)
Post: RE: Summing up set elements(HH:MM:SS)
Hope perfingo doesn't mind me infringing on his excellent function.
I was interested to see what happens when hour > 23 or time > 23:59:59
from datetime import timedelta
add_time = {"23:00:15... |
|
Pedroski55 |
General Coding Help |
4 |
306 |
Dec-22-2022, 09:09 AM |
|
|
Thread: Carpenter learning python
Post: RE: Carpenter learning python
Not an expert, but: There is the frontend, which is what you see, where you can click a button, enter a quantity, then there is the backend, which a. holds the data and b. does the calculations.
I'm ... |
|
Pedroski55 |
General Coding Help |
11 |
715 |
Dec-21-2022, 08:36 AM |
|
|
Thread: Trying to send file to printer with no results.
Post: RE: Trying to send file to printer with no results...
Most printers can handle pdfs no trouble I think.
Why don't you make a pdf, then print that? Quick and easy!!
Also, if they are not throwaway barcodes, you can print them again and again!
#! /usr/b... |
|
Pedroski55 |
General Coding Help |
2 |
346 |
Dec-21-2022, 07:12 AM |
|
|
Thread: Extracting Data into Columns using pdfplumber
Post: RE: Extracting Data into Columns using pdfplumber
The old admonition "read the docs" was never truer!! This was interesting for me though!
This should do it. I used your pdf. I only cropped out 6 lines for testing, you should change the vertical y1.... |
|
Pedroski55 |
General Coding Help |
17 |
638 |
Dec-17-2022, 08:10 AM |
|
|
Thread: Extracting Data into Columns using pdfplumber
Post: RE: Extracting Data into Columns using pdfplumber
Quote:>>> pdf_table
[[['00', '', '02', '', '04'], ['', '', '', '', ''], ['', '11', '', '13', ''], ['', '', '', '', ''], ['20', '', '22', '23', '24'], ['', '', '', '', ''], ['30', '31', '32', ... |
|
Pedroski55 |
General Coding Help |
17 |
638 |
Dec-16-2022, 07:27 AM |
|
|
Thread: Extracting Data into Columns using pdfplumber
Post: RE: Extracting Data into Columns using pdfplumber
Look here.
But it is still not quite right, some other formatting need to be set.
pdf_table = page.extract_tables(table_settings={
"vertical_strategy": "text",
"horizontal_strategy": "text"... |
|
Pedroski55 |
General Coding Help |
17 |
638 |
Dec-16-2022, 07:16 AM |
|
|
Thread: Extracting Data into Columns using pdfplumber
Post: RE: Extracting Data into Columns using pdfplumber
Can you post 1 page of your pdf with a table? Or the whole thing if it's not too big? |
|
Pedroski55 |
General Coding Help |
17 |
638 |
Dec-15-2022, 11:03 PM |
|
|
Thread: Extracting Data into Columns using pdfplumber
Post: RE: Extracting Data into Columns using pdfplumber
pdfs are complicated things!
Maybe open it with reportlab and save with reportlab??
I can use table to make a dataframe.
Quote:>>> import pandas as pd
>>> df = pd.DataFrame(table)... |
|
Pedroski55 |
General Coding Help |
17 |
638 |
Dec-15-2022, 12:15 PM |
|
|
Thread: Extracting Data into Columns using pdfplumber
Post: RE: Extracting Data into Columns using pdfplumber
Try this then look at table!
import pdfplumber
import re
path2pdf = '/home/pedro/myPython/reportlab_python/my_pdfs/'
savename1 = "simple_table1.pdf" # no borders
pdf = pdfplumber.open(path2pdf + sa... |
|
Pedroski55 |
General Coding Help |
17 |
638 |
Dec-15-2022, 08:20 AM |
|
|
Thread: Extracting Data into Columns using pdfplumber
Post: RE: Extracting Data into Columns using pdfplumber
I'm starting to understand your problem!
Using reportlab I made a very simple pdf with 1 table of 4 rows and 5 columns. The table had borders.
The data for the table looks like this:
Quote:data= [[... |
|
Pedroski55 |
General Coding Help |
17 |
638 |
Dec-15-2022, 05:27 AM |
|
|
Thread: Extracting Data into Columns using pdfplumber
Post: RE: Extracting Data into Columns using pdfplumber
What exactly is table? Actual text? Bytes? Or some kind of pdfplumber object?
Are column headers included in table? |
|
Pedroski55 |
General Coding Help |
17 |
638 |
Dec-14-2022, 07:02 AM |
|
|
Thread: Extracting Data into Columns using pdfplumber
Post: RE: Extracting Data into Columns using pdfplumber
Looks like each line of your data is separated by a space.
If that is so, just use .split() on each line to get a list of each item of data in the line.
The list can then be written to Excel or, I r... |
|
Pedroski55 |
General Coding Help |
17 |
638 |
Dec-13-2022, 09:21 AM |
|
|
Thread: Take user input and split files using 7z in python
Post: RE: Take user input and split files using 7z in py...
No idea what 7z is, but you could format the string like this perhaps:
split = '5000MB'
foldername = 'summinck'
two = 'summinck_else'
todo = f"cd /bot/files && 7z a -mx=1 -v+{split} /bot/zip/... |
|
Pedroski55 |
General Coding Help |
2 |
220 |
Dec-11-2022, 10:47 AM |
|
|
Thread: Python Resampling: How do I obtain the value of the last week of the month?
Post: RE: Python Resampling: How do I obtain the value o...
Haha, interesting!
In a computer, the time will be in seconds.
from datetime import datetime
now = datetime.now()
year = now.strftime("%Y")
month = now.strftime("%m")
day = now.strftime("%d")
secs =... |
|
Pedroski55 |
General Coding Help |
2 |
249 |
Dec-10-2022, 10:32 AM |
|
|
Thread: How to properly format rows and columns in excel data from parsed .txt blocks
Post: RE: How to properly format rows and columns in exc...
Quote:How would I include it in the block pattern to add to the dictionary
Just add a entry to your dictionary: key = "ItemName", value = "Terminator"
Quote:and export being in a different format?
... |
|
Pedroski55 |
General Coding Help |
7 |
381 |
Dec-09-2022, 10:43 PM |
|
|
Thread: merge two csv files into output.csv using Subprocess
Post: RE: merge two csv files into output.csv using Subp...
@DeaD_EyE after importing from __future__ import annotations it worked perfectly! Now all I need to do is try to understand what's happening!! **biggrin** **biggrin** **biggrin**
@mg24: if the dat... |
|
Pedroski55 |
General Coding Help |
9 |
526 |
Dec-08-2022, 10:36 PM |
|
|
Thread: merge two csv files into output.csv using Subprocess
Post: RE: merge two csv files into output.csv using Subp...
I'm always interested in learning new stuff from the experts here. Your function looks complicated!
Using the Idle shell I did:
from pathlib import Path
in_files = ['/home/pedro/myPython/csv/csv/t... |
|
Pedroski55 |
General Coding Help |
9 |
526 |
Dec-07-2022, 11:01 PM |
|
|
Thread: How I could do that in the best way?
Post: RE: How I could do that in the best way?
A simple way to do this, given that brackets need always be binary!
mystring = "http://{ }/something/{ }/{ }/{ }/{ }"
count = 0
for b in mystring:
if b == '{':
count +=1
print(cou... |
|
Pedroski55 |
General Coding Help |
5 |
291 |
Dec-07-2022, 01:27 AM |
|
|
Thread: How I could do that in the best way?
Post: RE: How I could do that in the best way?
If you get this:
Quote:http://{ }/something/{ }/{ }/{ }/{ }
Do you always know what goes in the { }?
If not, how will you decide? |
|
Pedroski55 |
General Coding Help |
5 |
291 |
Dec-06-2022, 09:22 AM |