• 21 Posts
  • 1.43K Comments
Joined 1 year ago
cake
Cake day: June 22nd, 2023

help-circle

  • Are you asking how to write a module that you can import?

    Yes, kinda.

    Are these the same set of DB files every time? Are the columns and other configurations the same? Are you writing new python code every month?

    They get updated by the accounting team each month. Some of them are csv, other come from an access database file, other from the sql server.

    Some of the code need to be run each month with the updated databases, but there’s a lot of ad hoc statistical studies that my boss ask for that use the same databases.

    Are you using some ETL process to spit out a bunch of files that you’d like to have imported and available easily? Are the formats the same but the filenames differ?

    I guess yes. And not, the accountants keep the same filenames but change the directory lmao.

    I think it’s the first thing you’re after. There are a bunch of tutorials knocking around about this, eg,

    Thanks, im checking it out.

    how do I make it available for all my new python projects to use?

    import sys sys.path.append('my\\modules\\directory) import my_module

    I get the impression you’re a data person rather than a programmer -perhaps you have a colleague who’s more of the latter you can tap up for this?

    You’re right, I’m an actuarie. I wanted to do computer science instead of actuarial sciences, but I tough that it would be better getting an actuarial degree and then doing a masters on CS (still in planning, maybe 2026). I’m the only guy on the company who uses python and people here thinks I’m a genius because I have automated some boring things from excel.







  • There’s some data that comes in CSV, other are database files, in the SQL server, excel or web apis. From some of them I need to combine multiple sources with different formags even.

    I guess I could have a database with everything more tidy, easier to use, secure and with less failure ratio. I’m still going to prepare the databases (I’m thinking on dataframe objects on a pickle, but I want to experiment with parquetd) so they don’t have to be processed every time, but I wanted something I could just write the name of the database and get the update version.