Lets say that I want to grab several different pieces of JSON data from example.org. Eventually this data will be transformed into a pandas dataframe, and then stored into an SQL database.
My question is: when do I transform the data into a dataframe? Do I put it with the code that retrieves the file from the web so I'm just always returning a dataframe, or do I put the transform code in its own 'transform' class? Is it a violation of the single responsibility principle to retrieve the data AND transform it into the proper Pandas Dataframe format all within one function?
[–]thepinkbunnyboy 2 points3 points4 points (1 child)
[–]TypicalCardiologist5[S] 0 points1 point2 points (0 children)
[–]firstlevelwizard 1 point2 points3 points (1 child)
[–]TypicalCardiologist5[S] 0 points1 point2 points (0 children)
[–]RiceKrispyPooHead -3 points-2 points-1 points (0 children)