" SERVICE wikibase:label {{ bd:serviceParam wikibase:language \"{language}\". }} }}\"\"\"\n",
"\n",
" query = f\"\"\"\n",
" SELECT DISTINCT ?itemLabel {\"\".join([f\"(SAMPLE(?{label}) AS ?{label})\" for label in property_labels_to_ids])} ?englishWikipedia ?germanWikipedia WHERE {{\n",
SELECT DISTINCT ?itemLabel {"".join([f"(SAMPLE(?{label})AS?{label})" for label in property_labels_to_ids])} ?englishWikipedia ?germanWikipedia WHERE {{
# Use the image directly; assuming the URLs are already correctly formed in the 'image' column
df['Media']=df['image']
# Add a "Group" column with the value "actors" for all rows
df['Group']='actors'
# fix date columns
df['Display Date']=df['Display Date'].fillna('')# Ensure no NaNs in Display Date
df['Headline']=df['Headline'].fillna('')# Ensure no NaNs in Headline
df['Text']=df['Text'].fillna('')# Ensure no NaNs in Text
df['Media']=df['Media'].fillna('')# Ensure no NaNs in Media
# Now select and order the DataFrame according to the TimelineJS template requirements
columns="Year Month Day Time End Year End Month End Day End Time Display Date Headline Text Media Media Credit Media Caption Media Thumbnail Type Group Background Link".split("\t")
Hans Kelsen,male,https://commons.wikimedia.org/wiki/Special:FilePath/http%3A//commons.wikimedia.org/wiki/Special%3AFilePath/Hans%2520Kelsen%2520%25281881%25E2%2580%25931973%2529%2520~1930%2520%25C2%25A9%2520Georg%2520Fayer%2520%25281892%25E2%2580%25931950%2529%2520OeNB%25208026867.jpg,Cisleithania,Hans,Kelsen,1881-10-11T00:00:00Z,1973-04-19T00:00:00Z,judge,international law,Charles University,31998356,0000000121266076,118561219
Hugo Sinzheimer,male,https://commons.wikimedia.org/wiki/Special:FilePath/http%3A//commons.wikimedia.org/wiki/Special%3AFilePath/Hugo%2520Sinzheimer.jpg,Germany,Hugo,Sinzheimer,1875-04-12T00:00:00Z,1945-09-16T00:00:00Z,lawyer,,University of Amsterdam,27864307,0000000109619641,118614711
Karl Renner,male,https://commons.wikimedia.org/wiki/Special:FilePath/http%3A//commons.wikimedia.org/wiki/Special%3AFilePath/Karl-renner-hn.jpg,Germany,Karl,Renner,1833-05-13T00:00:00Z,1913-09-22T00:00:00Z,merchant,politics,Austrian Federal Government,171170593,0000000054940875,1012296458
Ernst Fraenkel,male,,Germany,Ernst,Fraenkel,1891-04-05T00:00:00Z,1971-08-18T00:00:00Z,economic historian,Baltic,Goethe University Frankfurt,50078162,0000000081027854,121259854
Franz Leopold Neumann,male,,German Empire,Leopold,Neumann,1900-05-23T00:00:00Z,1954-09-02T00:00:00Z,lawyer,publishing,Office of Strategic Services,15561879,0000000109564943,118587293
Otto Kahn-Freund,male,https://commons.wikimedia.org/wiki/Special:FilePath/http%3A//commons.wikimedia.org/wiki/Special%3AFilePath/Sir%2520Otto%2520Kahn-Freund%252C%2520c1950.jpg,Germany,Otto,,1900-11-17T00:00:00Z,1979-08-16T00:00:00Z,judge,,University of Oxford,76317591,0000000109168959,118559362
Otto Kirchheimer,male,,United States of America,Otto,Kirchheimer,1905-11-11T00:00:00Z,1965-11-22T00:00:00Z,jurist,,Office of Strategic Services,32042801,0000000081110244,118562371
Ludwig Bendix,male,,Germany,Ludwig,Bendix,1877-06-28T00:00:00Z,1954-01-03T00:00:00Z,lawyer,,,74647579,0000000081553379,118702033
Arthur Nussbaum,male,https://commons.wikimedia.org/wiki/Special:FilePath/http%3A//commons.wikimedia.org/wiki/Special%3AFilePath/Arthur%2520Nussbaum.jpg,Germany,Arthur,Nussbaum,1877-01-31T00:00:00Z,1964-11-22T00:00:00Z,lawyer,international law,Columbia University,5180962,0000000120988288,117071676
Theodor Geiger,male,,Denmark,Theodor,Geiger,1891-11-09T00:00:00Z,1952-06-16T00:00:00Z,university teacher,,Technical University of Braunschweig,56667946,0000000109038951,118538187
Erhard Blankenburg,male,https://commons.wikimedia.org/wiki/Special:FilePath/http%3A//commons.wikimedia.org/wiki/Special%3AFilePath/Erhard%2520Blankenburg.jpg,Germany,Erhard,Blankenburg,1938-10-30T00:00:00Z,2018-03-28T00:00:00Z,sociology of law,sociology of law,Free University of Amsterdam,64109592,0000000110676109,115459235
Wolfgang Kaupen,male,,,Wolfgang,,1936-01-01T00:00:00Z,1981-01-01T00:00:00Z,sociologist,sociology of law,,32919813,0000000035495614,124045405
Rüdiger Lautmann,male,https://commons.wikimedia.org/wiki/Special:FilePath/http%3A//commons.wikimedia.org/wiki/Special%3AFilePath/Lautmann%25202012.jpg,Germany,Rüdiger,,1935-12-22T00:00:00Z,,sociologist,sociology of law,University of Bremen,24732961,000000011469331X,120502208
Thilo Ramm,male,,Germany,Thilo,Ramm,1925-04-04T00:00:00Z,2018-06-17T00:00:00Z,writer,,FernUniversität in Hagen,9924244,0000000108689541,116327391
Rudolf Wiethölter,male,,Germany,Rudolf,,1929-07-17T00:00:00Z,,jurist,,Goethe University Frankfurt,106974404,0000000116961365,1034437860
Niklas Luhmann,male,https://commons.wikimedia.org/wiki/Special:FilePath/http%3A//commons.wikimedia.org/wiki/Special%3AFilePath/HSGH%2520022-000941%2520Niklas%2520Luhmann%2520%2528cropped%2529.png,Germany,Niklas,Luhmann,1927-12-08T00:00:00Z,1998-11-06T00:00:00Z,researcher,sociology of law,TU Wien,29546145,0000000122778532,118575147
Gunther Teubner,male,https://commons.wikimedia.org/wiki/Special:FilePath/http%3A//commons.wikimedia.org/wiki/Special%3AFilePath/Gunther%2520Teubner%2520%25282017%2529.jpg,Germany,Gunther,Teubner,1944-04-30T00:00:00Z,,sociologist,,Goethe University Frankfurt,108364502,0000000109312017,119443562
Hans Kelsen,Q84165,male,http://commons.wikimedia.org/wiki/Special:FilePath/Hans%20Kelsen%20%281881%E2%80%931973%29%20~1930%20%C2%A9%20Georg%20Fayer%20%281892%E2%80%931950%29%20OeNB%208026867.jpg,Cisleithania,Hans,Kelsen,1881-10-11T00:00:00Z,1973-04-19T00:00:00Z,judge,international law,Charles University,31998356,0000000121266076,118561219
Hugo Sinzheimer,Q86043,male,http://commons.wikimedia.org/wiki/Special:FilePath/Hugo%20Sinzheimer.jpg,Germany,Hugo,Sinzheimer,1875-04-12T00:00:00Z,1945-09-16T00:00:00Z,lawyer,,Goethe University Frankfurt,27864307,0000000109619641,118614711
Karl Renner,Q11726,male,http://commons.wikimedia.org/wiki/Special:FilePath/Karl%20Renner%201905.jpg,Cisleithania,Karl,Renner,1870-12-14T00:00:00Z,1950-12-31T00:00:00Z,lawyer,politics,Austrian Federal Government,61669459,0000000121358165,118599739
Ernst Fraenkel,Q86812,male,,Germany,Ernst,Fraenkel,1898-12-26T00:00:00Z,1975-03-28T00:00:00Z,lawyer,,Free University Berlin,27108403,0000000110230959,118534602
Franz Leopold Neumann,Q112562068,male,,,Leopold,Neumann,,,printer,publishing,,637163874508945722514,,
Otto Kahn-Freund,Q121832,male,http://commons.wikimedia.org/wiki/Special:FilePath/Sir%20Otto%20Kahn-Freund%2C%20c1950.jpg,Germany,Otto,,1900-11-17T00:00:00Z,1979-08-16T00:00:00Z,judge,,University of Oxford,76317591,0000000109168959,118559362
Otto Kirchheimer,Q214397,male,,Germany,Otto,Kirchheimer,1905-11-11T00:00:00Z,1965-11-22T00:00:00Z,jurist,,Office of Strategic Services,32042801,0000000081110244,118562371
Ludwig Bendix,Q28053205,male,,,Ludwig,Bendix,1857-10-28T00:00:00Z,1923-09-28T00:00:00Z,university teacher,,,88720482,0000000061811334,1023309920
Arthur Nussbaum,Q103088,male,http://commons.wikimedia.org/wiki/Special:FilePath/Arthur%20Nussbaum.jpg,United States of America,Arthur,Nussbaum,1877-01-31T00:00:00Z,1964-11-22T00:00:00Z,lawyer,law,Columbia University,5180962,0000000120988288,117071676
Theodor Geiger,Q96410,male,,Germany,Theodor,Geiger,1891-11-09T00:00:00Z,1952-06-16T00:00:00Z,university teacher,,Technical University of Braunschweig,56667946,0000000109038951,118538187
Erhard Blankenburg,Q51595283,male,http://commons.wikimedia.org/wiki/Special:FilePath/Erhard%20Blankenburg.jpg,Germany,Erhard,Blankenburg,1938-10-30T00:00:00Z,2018-03-28T00:00:00Z,sociology of law,sociology of law,Free University of Amsterdam,64109592,0000000110676109,115459235
Wolfgang Kaupen,Q93221485,male,,,Wolfgang,,1936-01-01T00:00:00Z,1981-01-01T00:00:00Z,sociologist,sociology of law,,32919813,0000000035495614,124045405
Rüdiger Lautmann,Q91074,male,http://commons.wikimedia.org/wiki/Special:FilePath/Lautmann%202012.jpg,Germany,Rüdiger,,1935-12-22T00:00:00Z,,author,sociology of law,University of Bremen,24732961,000000011469331X,120502208
Thilo Ramm,Q59533838,male,,Germany,Thilo,Ramm,1925-04-04T00:00:00Z,2018-06-17T00:00:00Z,writer,,FernUniversität in Hagen,9924244,0000000108689541,116327391
Rudolf Wiethölter,Q1512482,male,,Germany,Rudolf,,1929-07-17T00:00:00Z,,jurist,,Goethe University Frankfurt,106974404,0000000116961365,1034437860
Niklas Luhmann,Q85691627,,,,,,,,researcher,,,,,
Gunther Teubner,Q98304,male,http://commons.wikimedia.org/wiki/Special:FilePath/Gunther%20Teubner%20%282017%29.jpg,Germany,Gunther,Teubner,1944-04-30T00:00:00Z,,jurist,,Goethe University Frankfurt,108364502,0000000109312017,119443562
Volkmar Gessner,Q15435946,male,http://commons.wikimedia.org/wiki/Special:FilePath/Volkmar%20Gessner%20%282006%29.JPG,Germany,Volkmar,Gessner,1937-10-09T00:00:00Z,2014-11-08T00:00:00Z,judge,comparative law,University of Bremen,69100039,0000000109127065,170469328