starting CountriesMergerTest

This commit is contained in:
frankknoll
2023-03-31 11:17:21 +02:00
parent 9db4c75765
commit 70e5688be3
2 changed files with 34 additions and 0 deletions

10
src/CountriesMerger.py Normal file
View File

@@ -0,0 +1,10 @@
import pandas as pd
class CountriesMerger:
@staticmethod
def mergeCountriesSerieses(countriesSeriesA, countriesSeriesB):
return (pd
.merge(countriesSeriesA, countriesSeriesB, how='left', left_index=True, right_index=True)
.apply(lambda countries: sorted(set(countries.dropna())), axis='columns'))