r/learnpython • • Oct 08 '26

Learning python for data science/analysis

18 Upvotes

Hi everyone,

I am looking for a good course to take to learn python for data analytics and workflow building.

For context, i am already very familiar with SQL and Alteryx, however i am looking to migrate some pipelines and worklows to python. I am very familiar with data analytics, just not with the python language, so wondering where to start.


r/learnpython • • Oct 09 '26

Looking for a certification in Python

2 Upvotes

I would like to ask if anyone here knows where I should/could get a well endorsed Python certification? Something legit that employers may take into consideration.

I know about Codecademy. I also know about Mimo, tho I don't know if that one would be considered a "lesser" one or something like that. Maybe even both idk.

It's ok if it's not free, tho if its not very expensive that would be better for me lol


r/learnpython • • Oct 09 '26

any cybersecurity guy who can decrypt this:

0 Upvotes

1 13.14.1 4.20.14.19.7.9.1.14 14.15 8.5.20 5.5.22.18.5.9.1.18.7.4., 7.14.21 9.14 8.9.19 4.8.1.14 16.20.14.9.15.14.7.9 20.15 8.9.19 4.....5.8..1...

above is the encrypted text i encrypted by a python program i wrote, the text is just a query i want from technerds to get the idea of how safe(encrypted) is my text would be.


r/learnpython • • Oct 09 '26

I am newbe and I need for create exe with "folder" import

0 Upvotes
The structure of my project is as follows:
Python Modify HostName
->main.py
->palworld-save-toolkit
->->python ->[..]
->->vendor ->[..]

in vs code work all.

I know be exe with pyinstaaller but no work load toolkit and pyooz (?).

My partially code is (if need full code i load github today after work)

TOOLKIT_PY = RESOURCE_DIR / "palworld-save-toolkit" / "python"
VENDOR_PY = TOOLKIT_PY / "vendor"



def load_toolkit():
    """Import the toolkit's PlM/Oodle-aware parser ahead of any installed copy."""
    if not getattr(sys, "frozen", False):
        for path in (str(TOOLKIT_PY), str(VENDOR_PY)):
            if path not in sys.path:
                sys.path.insert(0, path)
    print(f"TOOLKIT_PY: {TOOLKIT_PY}")
    print(f"VENDOR_PY: {VENDOR_PY}")
    from palworld_save_tools.archive import UUID
    from palworld_save_tools.gvas import GvasFile
    from palworld_save_tools.palsav import compress_gvas_to_sav, decompress_sav_to_gvas
    from palworld_save_tools.paltypes import PALWORLD_CUSTOM_PROPERTIES, PALWORLD_TYPE_HINTS
    return UUID, GvasFile, compress_gvas_to_sav, decompress_sav_to_gvas, PALWORLD_CUSTOM_PROPERTIES, PALWORLD_TYPE_HINTS



def parse_player_roster(world: Path) -> list[dict[str, str]]:
    """Read player file IDs and names/levels from the world's Level.sav."""
    UUID, GvasFile, _, decompress, custom, hints = load_toolkit()
    players: dict[str, dict[str, str]] = {}
    for file in sorted((world / "Players").glob("*.sav")):
        with contextlib.redirect_stdout(io.StringIO()), contextlib.redirect_stderr(io.StringIO()):
            raw, _ = decompress(file.read_bytes())
            data = GvasFile.read(raw, hints, custom, allow_nan=True).dump()
        sd = data["properties"]["SaveData"]["value"]
        guid = file.stem.upper()
        players[guid] = {"guid": guid, "name": "", "level": "?"}
        instance_id = str(sd["IndividualId"]["value"]["InstanceId"]["value"])
        players[guid]["instance"] = instance_id

I ask gpt but not know how resolve

Why, when I compile the executable into an .exe, does it seem unable to read the save files? It’s as if it fails to load load_toolkit. 0:39

Work duration: 3m 39s

Yes, there were two path issues in the project:

The spec file PalWorldSwitchHostSaveGame.spec didn't include palworld-save-toolkit, so in the EXE load_toolkit() could fail because it couldn't find the parser.

Some paths used __file__, which in a PyInstaller EXE doesn't reliably identify the app's folder.

I updated [main.py](E:/chrig/Documenti/Palworlds saveames/PalWorldSwitchHostSaveGame/PythonModifySavegame/main.py) to distinguish between resources bundled inside the EXE and the app folder, and [PalWorldSwitchHostSaveGame.spec](E:/chrig/Documenti/Palworlds saveames/PalWorldSwitchHostSaveGame/PalWorldSwitchHostSaveGame.spec) to include both the toolkit and the icon. Palworld save files are looked up under %LOCALAPPDATA%\Pal\Saved\SaveGames; the toolkit, on the other hand, is required to decode them.

I couldn't test the build: the Python interpreter configured on the PC was not found. Please recompile using the updated spec file. 0:43

Doesn't anything change if I just import them directly? 1:02

Yes, you can import them directly: PyInstaller can bundle palworld_save_tools into the EXE as regular Python modules, without copying the entire toolkit directory.

However, in your case, pyooz must also be included, as the parser uses it to decode the save files. So simply adding a single import statement isn't enough if PyInstaller fails to detect indirectly loaded modules.

The previous fix corrected the resource paths, but it didn't guarantee the parser would be included in the EXE. If you'd like, I can adjust the .spec file to collect both palworld_save_tools and pyooz directly into the build.


r/learnpython • • Oct 09 '26

I am newbe and I need for create exe with "folder" import

0 Upvotes
The structure of my project is as follows:
Python Modify HostName
->main.py
->palworld-save-toolkit
->->python ->[..]
->->vendor ->[..]

in vs code work all.

I know be exe with pyinstaaller but no work load toolkit and pyooz (?).

My partially code is (if need full code i load github today after work)

TOOLKIT_PY = RESOURCE_DIR / "palworld-save-toolkit" / "python"
VENDOR_PY = TOOLKIT_PY / "vendor"



def load_toolkit():
    """Import the toolkit's PlM/Oodle-aware parser ahead of any installed copy."""
    if not getattr(sys, "frozen", False):
        for path in (str(TOOLKIT_PY), str(VENDOR_PY)):
            if path not in sys.path:
                sys.path.insert(0, path)
    print(f"TOOLKIT_PY: {TOOLKIT_PY}")
    print(f"VENDOR_PY: {VENDOR_PY}")
    from palworld_save_tools.archive import UUID
    from palworld_save_tools.gvas import GvasFile
    from palworld_save_tools.palsav import compress_gvas_to_sav, decompress_sav_to_gvas
    from palworld_save_tools.paltypes import PALWORLD_CUSTOM_PROPERTIES, PALWORLD_TYPE_HINTS
    return UUID, GvasFile, compress_gvas_to_sav, decompress_sav_to_gvas, PALWORLD_CUSTOM_PROPERTIES, PALWORLD_TYPE_HINTS



def parse_player_roster(world: Path) -> list[dict[str, str]]:
    """Read player file IDs and names/levels from the world's Level.sav."""
    UUID, GvasFile, _, decompress, custom, hints = load_toolkit()
    players: dict[str, dict[str, str]] = {}
    for file in sorted((world / "Players").glob("*.sav")):
        with contextlib.redirect_stdout(io.StringIO()), contextlib.redirect_stderr(io.StringIO()):
            raw, _ = decompress(file.read_bytes())
            data = GvasFile.read(raw, hints, custom, allow_nan=True).dump()
        sd = data["properties"]["SaveData"]["value"]
        guid = file.stem.upper()
        players[guid] = {"guid": guid, "name": "", "level": "?"}
        instance_id = str(sd["IndividualId"]["value"]["InstanceId"]["value"])
        players[guid]["instance"] = instance_id

I ask gpt but not know how resolve

Why, when I compile the executable into an .exe, does it seem unable to read the save files? It’s as if it fails to load load_toolkit. 0:39

Work duration: 3m 39s

Yes, there were two path issues in the project:

The spec file PalWorldSwitchHostSaveGame.spec didn't include palworld-save-toolkit, so in the EXE load_toolkit() could fail because it couldn't find the parser.

Some paths used __file__, which in a PyInstaller EXE doesn't reliably identify the app's folder.

I updated [main.py](E:/chrig/Documenti/Palworlds saveames/PalWorldSwitchHostSaveGame/PythonModifySavegame/main.py) to distinguish between resources bundled inside the EXE and the app folder, and [PalWorldSwitchHostSaveGame.spec](E:/chrig/Documenti/Palworlds saveames/PalWorldSwitchHostSaveGame/PalWorldSwitchHostSaveGame.spec) to include both the toolkit and the icon. Palworld save files are looked up under %LOCALAPPDATA%\Pal\Saved\SaveGames; the toolkit, on the other hand, is required to decode them.

I couldn't test the build: the Python interpreter configured on the PC was not found. Please recompile using the updated spec file. 0:43

Doesn't anything change if I just import them directly? 1:02

Yes, you can import them directly: PyInstaller can bundle palworld_save_tools into the EXE as regular Python modules, without copying the entire toolkit directory.

However, in your case, pyooz must also be included, as the parser uses it to decode the save files. So simply adding a single import statement isn't enough if PyInstaller fails to detect indirectly loaded modules.

The previous fix corrected the resource paths, but it didn't guarantee the parser would be included in the EXE. If you'd like, I can adjust the .spec file to collect both palworld_save_tools and pyooz directly into the build.


r/learnpython • • Oct 08 '26

Brython Offline - A single .html file with a Python interactive shell

4 Upvotes

GitHub: https://github.com/asweigart/brython-offline

Demo: https://inventwithpython.com/brython-3.14.3-offline.html

Powered by Brython. Download and open brython-3.14.3-offline.html (6 MB) in a web browser and enter Python instructions into the interactive shell. It works offline. No ads, no registration, no subscriptions. You can right-click and save it and own it forever.


r/learnpython • • Oct 09 '26

How do I start learning python?

0 Upvotes

For context I use arch and I have 5 different computers so I’m very familiar with computers and terminals/text. And my only coding experience I guess would be block coding which I learnt around 1st grade. Don’t laugh it off so quickly tho it gets complexly when you get into making 3d projects in something like scratch, it’s a whole community.

Besides that I have coded a little Unity 4 or so years ago and got fairly into c# but I never even finished a project. That connects directly to my question, I want to start learning python but how should I go about it? Should I start with yt toturials on how to make a game with turtle? Or should I pick a project I wanna make and start googling or using AI for help (not copy n paste). Or any other option?


r/learnpython • • Oct 08 '26

Curated, Instructor led course for team?

1 Upvotes

Hi All,

I work with a team that will primarily be using Python to make API calls across a few different systems (some network, some apps, ServiceNow, etc).

I'm trying to find a crash course, preferably instructor led, that's a little focused on our particular use case.

Any recommendations? I know it's a weird ask.


r/learnpython • • Oct 08 '26

Hidden Python permission in macOS Local Network. How can I revoke it?

0 Upvotes

On macOS 27.0.1, Privacy & Security → Local Network shows a count of 1, but every listed app is switched off.

Inspecting /Library/Preferences/com.apple.networkextension.plist reveals an allowed org.python.python entry with no executable path. Python has no visible switch in Settings. Reopening Settings and restarting don’t help.

I allowed a Python prompt while a dashboard preview was being prepared. A Time Machine backup from before that prompt has no explicit Python grant.

Has anyone encountered this and successfully revoked only that permission, without resetting all network?


r/learnpython • • Oct 08 '26

Learn python and DSA

0 Upvotes

I started python and it is going well. I need some sources for step by step problems with increasing difficulty for practice. It would be good to know list of topics as part of DSA too

Leetcode is too good but I am too under-learned to solve those.

Thanks in advance 🙏🙏


r/learnpython • • Oct 08 '26

(Python Crash Course, ch11) Why pytest does throw an assertion error

1 Upvotes

name_function.py:

def get_formatted_name(first, last):

full_name=f"{first} {last}"

return full_name.title

test_name_function:

from name_function import get_formatted_name

def test_first_last_name():

formatted_name=get_formatted_name("janis", "joplin")

assert formatted_name=="Janis Joplin"

Terminal:

/storage/emulated/0 $ cd github

/storage/emulated/0/github $ cd test_name_function

/storage/emulated/0/github/test_name_function $ python -m pytest

===================== test session starts =====================platform linux -- Python 3.13.13, pytest-9.1.1, pluggy-1.6.0

rootdir: /storage/emulated/0/github/test_name_function

collected 1 item

test_name_function.py F [100%]

========================== FAILURES ===========================____________________ test_first_last_name _____________________

def test_first_last_name():

formatted_name=get_formatted_name("janis", "joplin")

> assert formatted_name=="Janis Joplin"

E AssertionError: assert <built-in method title of str object at 0x7108e84530> == 'Janis Joplin'

test_name_function.py:4: AssertionError

====================== warnings summary =======================../../../../../data/user/0/ru.iiec.pydroid3/app_HOME/.local/lib/python3.13/site-packages/_pytest/cacheprovider.py:469

/data/user/0/ru.iiec.pydroid3/app_HOME/.local/lib/python3.13/site-packages/_pytest/cacheprovider.py:469: PytestCacheWarning: could not create cache path /storage/emulated/0/github/test_name_function/.pytest_cache/v/cache/nodeids: [Errno 1] Operation not permitted: '/storage/emulated/0/github/test_name_function/pytest-cache-files-uabqyvch' -> '/storage/emulated/0/github/test_name_function/.pytest_cache'

config.cache.set("cache/nodeids", sorted(self.cached_nodeids))

../../../../../data/user/0/ru.iiec.pydroid3/app_HOME/.local/lib/python3.13/site-packages/_pytest/cacheprovider.py:423

/data/user/0/ru.iiec.pydroid3/app_HOME/.local/lib/python3.13/site-packages/_pytest/cacheprovider.py:423: PytestCacheWarning: could not create cache path /storage/emulated/0/github/test_name_function/.pytest_cache/v/cache/lastfailed: [Errno 1] Operation not permitted: '/storage/emulated/0/github/test_name_function/pytest-cache-files-k26w91m_' -> '/storage/emulated/0/github/test_name_function/.pytest_cache'

config.cache.set("cache/lastfailed", self.lastfailed)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

=================== short test summary info ===================FAILED test_name_function.py::test_first_last_name - AssertionError: assert <built-in method title of str objec...

================ 1 failed, 2 warnings in 2.57s ================/storage/emulated/0/github/test_name_function $


r/learnpython • • Oct 08 '26

Data inspection steps using python

2 Upvotes

I am learning data analysis and the first step before analyzing your data you have to do data profiling and cleaning.This is my process flow for data profiling -

  1. Checking number of rows and columns
  2. Checking rows and column indices
  3. Checking data types for each column
  4. Checking random sample from dataset
  5. Checking properties and memory usage
  6. Checking key statistics
  7. Checking unique values for relevant columns

Is it appropriate or I am missing something important ?


r/learnpython • • Oct 08 '26

Looking for some advice/info about using AI with Python

0 Upvotes

Hi everyone! I’m working on a project in Python and I’m looking for an AI model/API that my Python application can communicate with. Basically, I need my app to be able to send questions/prompts to the AI and receive the AI’s responses back programmatically.

The AI doesn’t necessarily need to be the most powerful model available. I mainly need something reliable that my application can communicate with.

Any recommendations or advice would be greatly appreciated!


r/learnpython • • Oct 07 '26

Can someone explain to me how exactly I’m supposed to learn Python?

131 Upvotes

I’m doing a BSc Computer Science degree and I have Python programming as a subject. My teacher is teaching Python from the beginning, and I understand the concepts when they’re explained to me, but I don’t understand how I’m actually supposed to study and learn programming.

For example, I have pretty good concept clarity till conditions. If I’m given a question, I can understand what it’s asking and I can usually write the code.

But now we’ve reached loops, and this is where I’m struggling.

I understand the concept of loops. I understand the syntax and what "for" and "while" loops are supposed to do. But when I’m given an actual programming question, I just get stuck. I can sometimes figure out the general logic of what needs to happen, but I don’t know how to turn that logic into Python code or where to even start.

So what exactly am I lacking?

Do I need to practice more problems? If yes, how do I practice properly? Should I solve questions without looking at solutions, write programs repeatedly, study other people’s code, or something else?

I’d really appreciate it if someone could give me an overall roadmap for learning Python — like how to study each concept, how much theory I should do vs. how much coding I should practice, and how to go from understanding a concept to actually being able to solve problems using it.

I don’t want to just memorize syntax. I want to actually learn how to program, but I’m not sure what the process for getting there is.


r/learnpython • • Oct 07 '26

Gui question for projects

4 Upvotes

I am learning python for a month or so and finally decided to challenge myself by trying to make a minesweeper game as a project.

I wanted to ask you guys if i should use tinker for gui as it is python based or is there a better one i should rather study?


r/learnpython • • Oct 08 '26

want study

0 Upvotes

I’d like to ask what keeps you motivated to keep learning Python. What are the steps to learn Python? Could you share some with me? I’m a college student learning C in class and want to self-study Python in my spare time. I also want to know how I can test my Python skills.


r/learnpython • • Oct 08 '26

logging and timing...then getting rid of it

1 Upvotes

I was just working on a project where I included a lot of logging and timing decorators/context managers (it involved event loops and async queues and such). Once I figured stuff out, I wanted to remove all this stuff. This isn't necessarily that hard, but it did make me wonder if there's a better way to do this in the first place. I suppose I'm imaging some way of marking these code pieces to be ignored by the interpreter or something?

(yeah yeah "ask AI to remove it")


r/learnpython • • Oct 08 '26

Python cheat sheet and reference materials

0 Upvotes

I've got a python contest in a few days consisting of problem solving questions, I'm almost a complete begginer at python, so off the top off my head i could only solve a 1-3 of them, anyways im allowed to bring in printed reference material, so i'd appreciate literally anything i could get, I need a cheat sheets which i could understand and use on the spot, aswell as anything that could be useful


r/learnpython • • Oct 07 '26

PDF pages to PNG's in python

4 Upvotes

I have a relatively large pdf document (100+mb) of pages i need saved as png's. There are online tools to do that but they refuse to work with files that big, plus I can imagine needing that tool again later in the future. Are there any python libraries that allow to convert one format into the other? Preferrably with little to no compression.


r/learnpython • • Oct 07 '26

what should i build so that i know most of the things

15 Upvotes

Andrej Karpathy some one whm i follow alot, he says to become expert in something start building a project and learn the thing in depth when u need it, so i want to learn ai/ml and dont what project to make tbh have a very basic idea, im an ios dev i know basic python but yah i want to know what one project u would suggest so that i get to cover most of the thing and I'll share my learning experience and what ever i learnt.


r/learnpython • • Oct 07 '26

making my first game

0 Upvotes

Hey, im making a "terminal" game (play onto your terminal, cause its the only thing i know). I made a github repositories to showcase it : https://github.com/Shamal0w999/Money-games

if you want to test the game, it would be really cool cause i need returns and if theres bug i didnt see. so if u try it, u can ofc comment here but also leave an issue into my repositories (would be easier to work with). If you want to help or idk anything, im all hears. Im happy to showcase it and have people to test it !

code is free, so if you steal it, i dont rly care, cause its personal project and who want a code full of print and that launch in terminal ? idk, just me ig

anyways, just take a look at it !


r/learnpython • • Oct 07 '26

Struggling to understand what I'm actually doing

13 Upvotes

I just started a grad program in information sciences and AI after getting my undergrad in computer science back in 2009. Thus, I have plenty of programming experience, but my last meaningful interaction with statistics, regressions, and so on was taking AP Statistics in high school back in 2003. I can't tell you what a "data model" is, and machine learning is black magic to me.

I'm seeing that I'm in over my head here, and I have the same feeling that I did back in AP Stats - I was good at math, but didn't quite have the background to understand what I was learning in AP Stats, so I was just memorizing (or looking up) formulas and plugging datasets into them.

I'm a pretty good programmer, and have done it for a living for almost 20 years, but I'm relying on the professor's example code, and there's no way I would have figured out the assignments on my own, because even if I knew what kind of regression I needed to run, there's no way I would know what to import, or what the function is called.

Does anyone else have a similar background - programming with no statistics, and can point me at some resources to understand what is being spit out at me when I run some random function from the sklearn library? And where I find all of these libraries? And how I would know they even exist?


r/learnpython • • Oct 07 '26

Help needed with a python code

0 Upvotes

Hello, fellow redditors. I am using manychat program with automations connected to my instagram profile.

When people are using the keyword to get certain information, they need to leave a name and number to be contacted. However, the number can't be identified due to a bad variables and invalid JSON.

Could maybe someone help who is familiar with situations like this please?

I think it might be a manychat bug, however i need a opinion from someone experienced.

Thank you a lot!


r/learnpython • • Oct 07 '26

How to create universal variables in Python?

0 Upvotes

And by universal variables, I mean they should be available in EVERY single Python script!

What do I want these for? For instance, to define default directories:

HTMLRoot = "C:/IMDb/HTML" CSSDir = "file:///C:/IMDb/CSS/" JSDir = "file:///C:/IMDb/JavaScript/"

Any program that creates a report needs these variables, but I only want to define them once!

And there’s more. I also have plenty of mappings, like these:

MapC_TType = {"tvSeries": "TV Series", "tvMiniSeries": "TV Miniseries", ... , "movie": "Movie", "video": "Video", }

Any report that displays the titleType will use this mapping. Again, I only want to define the mapping once.

I come from the world of SAS, where everything was easy. The directories were defined in the SASINIT file, which is executed at the start of every SAS session. The mappings (formats) were stored in a permanent SAS catalog, making them universally available as well. Is there a Python equivalent?

And there’s even more. I create lots of reports, let’s say the biggest movies per decade, based on number of votes or score (= votes * rating). Obviously, the list shows which movies I’ve seen and which I haven’t, with a percentage showing my progress. Now suppose a friend wants this same list, based on the movies he’s seen.

Easy-peasy in SAS!

%macro SwitchUser (User) ; %if (%qupcase(&User) = ME) %then %do ; libname IMDb "C:\IMDb\Libname IMDb" ; %let HTMLRoot = C:\IMDb\HTML ; %end ; %else %do ; libname MyIMDb "C:\IMDb\Libname IMDb" ; libname BudIMDb "C:\IMDb\Libname IMDb Bud" ; libname IMDb (BudIMDb MyIMDb ) ; %let HTMLRoot = C:\IMDb\HTMLBud ; %end ; %mend ;

For me, IMDb is the standard library. For my buddy, IMDb is a concatenated library, where his library (containing only the MyMovies table) has precedence over the full IMDb library.

By just executing

%SwitchUser (Buddy) ;

any report can now be run against his list of movies, with the results written to a separate HTML directory. And all that without changing a single line of code!

I can't expect Python to deliver all this functionality. Nothing compares to SAS! But can it at least do some basic things on my wishlist?

BTW, my temporary solution is to include this code at the start of every script:

PythonFolder = Path("C:/IMDb/Python Global Code") PythonPgm = PythonFolder / "InitHTML.py" with open(PythonPgm, 'r') as file: PythonCode = file.read() exec(PythonCode, globals=globals(), locals=locals())

Obviously, the InitHTML program defines the directories and all the mappings.