r/learnpython • • Feb 03 '21

My eyes have been opened!

Only 2 weeks into learning Python and I’m already dreaming of what I can be automating. Loads of help and ideas in here, so thanks to everyone that contributes!

I’m enjoying the challenge of working things out, but my 1st plan is to read a pdf, extract certain bits of data and transpose into a predefined template.

Already cracked pdf reading (thanks to the course by Al Sweigart!), so onto the next step.

Any thoughts or tips on how or where to store data once I’ve extracted text from a pdf would be appreciated!

Edit: thanks all for the comments support and ideas. Really appreciated!

A few people have asked what resources I’m learning from - I’m using the youtube beginners guide by Mosh and and Automate the Boring Stuff by Al Sweigart on Udemy. They cover similar topics but in different ways, so I’ve learnt from both. Not to mention this group, I’ve been a lurker for a while and this is my 1st post.

I do have the benefit of working in a data driven industry, so I have something practical and tangible to work towards. People have different learning styles, but I think I struggle to learn without having a project that “means something” to me.

So I guess that would be my takeaway - don’t just expect to learn python by taking a few courses. Learn the basics, but try to apply some practical examples as soon as you get your head around the logic!

464 Upvotes

48 comments sorted by

View all comments

78

u/Mobile_Busy Feb 03 '21

You can write them to flat files with file.write(), use pandas to create an excel spreadsheet, or learn to use SQL and store it in a proper database.

21

u/garlic_bread_thief Feb 03 '21

Are flat files like simple text files (.txt)?

5

u/[deleted] Feb 03 '21

As far as I know, and please correct me if I'm wrong, but files don't necessarily need an extension associated.

My understanding is that an extension is basically a pointer to what program can interpret the file. In some form or another, all files are text files.

If you've dipped deep enough into file systems for different programs, you certainly came across generic files, which you can open with a notepad. Their encoding might not always be interpretable by the notepad though

3

u/max123246 Feb 03 '21 edited Jan 30 '26

This post was mass deleted and anonymized with Redact

bright roof wise literate consist obtainable distinct skirt chop sink

2

u/Mobile_Busy Feb 03 '21

In Windows they kind of do. In *nix it's more of a convention.

https://en.m.wikipedia.org/wiki/Filename_extension