Fix: lot, type and locataire extraction
This commit is contained in:
parent
c0c550bd59
commit
9c06c64ae4
@ -5,18 +5,11 @@ import pandas as pd
|
||||
|
||||
def parse_above_loc(content):
|
||||
row = {}
|
||||
try:
|
||||
app, loc = content.split("\n")
|
||||
except ValueError:
|
||||
row["lot"] = ""
|
||||
row["type"] = ""
|
||||
row["locataire"] = content
|
||||
|
||||
else:
|
||||
app_ = app.split(" ")
|
||||
row["lot"] = app_[1]
|
||||
row["type"] = " ".join(app_[2:])
|
||||
row["locataire"] = loc
|
||||
app, loc, *_ = content.split("\n")
|
||||
app_ = app.split(" ")
|
||||
row["lot"] = app_[1]
|
||||
row["type"] = " ".join(app_[2:])
|
||||
row["locataire"] = loc
|
||||
return pd.Series(row)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user