This is a question for people more experienced with Python, but everybody feel free to answer if you feel like you can provide something decent to the discussion.

Also feel free to explain why you feel that way and your experiences with Python and the paradigms.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] 12 points 1 year ago (2 children)

For me it depends on the use case. If I'm designing something with an interface for someone downstream to use, I'll usually define (data)classes even if I have a functional interface.

For data science/modeling/notebooks I usually wouldn't define classes.

I think it also depends on your team; if everyone else is a functional programmer and you're writing classes or vice versa, this will undoubtedly create frictions.

  • source
  • hideshow 2 child comments
  • [โ€“] 1 point 1 year ago (1 child)

    I use python for data sciences (kinda) and never write any classes or something object oriented, but given that dataframes are the bread and butter of everything I do, I guess I work in a object oriented workflow?

  • source
  • parent
  • hideshow 1 child comment
  • [โ€“] 1 point 1 year ago

    Yeah that's a great point -- the dataframe is in a sense a class or object standardized for data analysis. Its flexibility (like being able to store arrays or dicts even) obviates the need in most cases for a user-written class.

  • source
  • parent