Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit e0696b32 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update recordpubli to improve find_affiliation algorithm.

parent dcef58ba
......@@ -396,13 +396,13 @@ class RecordPubli(Record):
df = self["authors"]
# modify the pattern to capture group
pattern = "(%s)" % pattern
query = df.affiliation.str.match(pattern)
data = df[query]
data = (df.affiliation.str.extract(pattern, expand=False)
if data.empty:
return ""
data = data.affiliation.unique()
return (data[0] if len(data) > 0 else "")
def find_authors(self, pattern, sep=", ", sort=False):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment