Код: Выделить всё
invention_title doc_number date
0 Doughnut product with six appendages 29327507 2008
1 Doughnut product with six appendages and witho... 29327632 2008
2 Doughnut product with six appendages and witho... 29327637 2008
3 Meat piece 29298838 2007
4 Pet treat 29320494 2008
...
Код: Выделить всё
# Import the model classes you need
from patent_client import Inpadoc, Assignment, USApplication
# Fetch US Applications
app={}
patent_x=[]
publn_nr=[]
for i in range(len(df_all)):
try:
app[i] = USApplication.objects.get(df_all['doc_number'][i])
except:
pass
try:
patent_x.append(app[i].patent_number)
except:
patent_x.append('')
try:
publn_nr.append(app[i].publication_number)
except:
publn_nr.append('')
df_all['patent_x']=patent_x
df_all['publn_nr']=publn_nr
Подробнее здесь: https://stackoverflow.com/questions/772 ... ent-client