Populating column in dataframe with pySpark
问题 new to pySpark and I'm trying to fill a column based on conditions using a list. How can I fill a column based conditions using a list? Python logic if matchedPortfolios == 0: print("ALL") else: print(Portfolios) pySpark attempt with error #Check matching column values in order to find common portfolio names Portfolios = set (portfolio_DomainItemLookup) & set(portfolio_dataset_standardFalse) Portfolios #prints list of matched names OR prints empty list matchedPortfolios = len(Portfolios)