

Posts_data = UkrainePosts().get_data_for_all_subreddits() Sub, self._subreddits_search_string_dict, limit=1000 If any(search_str in post.title for search_str in search_strings):įor attribute in RawAttributesToExtract().postįor sub in self._subreddits_search_string_dict: Limit (int): number of posts to search in hot Search_strings (str): list of sub strings extracted post can have """Extracts specfic subreddit's posts, appends into _data list Self, subreddit_name: str, search_strings: str, limit: int

Users: list = field(default_factory=lambda: ) import jsonįrom import StructType, StructField, StringType, DoubleTypeĬomments: list = field(default_factory=lambda: ) Why is initiation of a new sparkcontext get or create object disallowed by previous one's error? Sorry if its a very noob question, I couldn't find a remedy going through docs. When i try to initiate spark object again, connection 111 doesn't go away. Attached code below - Is the problem in the structype? i wanted to allow all columns to allow nullable values on construction.

While running df.head() or df.show() the below error is generated.
