Skip to content

Commit

Permalink
handle warning
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardchalstrey1 committed Oct 29, 2024
1 parent 1fcc8d1 commit 37692bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/camels.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"outputs": [],
"source": [
"# Create a new empty DataFrame to store the frequency of each camel value for each year\n",
"frequency_df = pd.DataFrame(index=years, columns=absent_present_values).fillna(0)\n",
"frequency_df = pd.DataFrame(index=years, columns=absent_present_values).infer_objects(copy=False).fillna(0)\n",
"print(frequency_df.sample(5)) # Show a random sample of 5 rows"
]
},
Expand Down
2 changes: 1 addition & 1 deletion seshat_api/seshat_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def get_frequencies(client, class_names, years, value='present'):
dataframes.append(polities_with_var_df)

# Create a DataFrame to store the frequency of each variable having the value across polities over time
frequency_df = pd.DataFrame(index=years, columns=variables).fillna(0)
frequency_df = pd.DataFrame(index=years, columns=variables).infer_objects(copy=False).fillna(0)

# Count the number of polities with the value for each variable for each year
for year in years:
Expand Down

0 comments on commit 37692bb

Please sign in to comment.