Had a use for reduce recently at work. My tester wanted to combine some nested dictionaries, so I wrote a function for him to do it, which took two dictionaries and returned a new dictionary that was the combination of the two. Two days later he said "can we do this with a list of dictionaries" and reduce was the perfect way to do that. I probably wouldn't use this for production code, but for test suite code it ended up being a great solution
@JakeCallahan Apologies I've only just seen this. I did another one recently # iterate over a list of directories and read in a parquet file to a spark dataframe # add a filename column to each dataframe duplicates = ( reduce(Dataframe.union, list_of_dataframes).groupby("uniqueid").agg(sf.collect_list("filename").alias("filenames").filter(sf.size(sf.col("filenames")) >1).collect() ) Might need some formatting on that one. Typing on a phone. I'll find the recursive dictionary merge later and post that too
The thing to remember, is that when you call a method from an instance, self is the instance. When you call the same method from a class, you can pass an instance of the class in as self. For example ", ".join(list_of_strings) Or str.join(", ", list_of_strings)
I have very little exposure to Django, so would not be a good teacher for a course on that. In the past I've tended to favor Flask, but today would also be inclined to try out FastAPI. Django might be something I revisit in the future, but that won't be anytime soon unfortunately.
Since I haven't personally gone through any available Django courses, I wouldn't want to mislead you with a poor recommendation. I'd hate to waste your time. However, if you do find a Django course you like, please link it here so others can follow your lead!
@@JakeCallahan I think this channel is good if you want to learn about the "theory" of Django, but i really wanted another resource to learn from. Very Academy:youtube.com/@veryacademy?si=7mF2rSqa3QVkivGK