You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In hist3368-week5-plotting-change-over-time/hist3368-week5-access-data.ipynb, there is a typo. Under the US Congress heading in the read_csv function the argument warning_bad_lines should be warn_bad_lines.
The code should be:
import pandas as pd
import csv
import glob
directory = '/scratch/group/oit_research_data/stanford_congress/hein-bound/'
file_type = 'txt'
delim ='|'
speeches_df = pd.concat([pd.read_csv(f, sep=delim, encoding="ISO-8859-1", error_bad_lines=False, warn_bad_lines = False, quoting=csv.QUOTE_NONE)
for f in glob.glob(directory + "speeches_*"+file_type)])
descr_df = pd.concat([pd.read_csv(f, sep=delim, encoding="ISO-8859-1", error_bad_lines=False, warn_bad_lines = False, quoting=csv.QUOTE_NONE)
for f in glob.glob(directory + "descr_*"+file_type)])
all_congressional_data = pd.merge(speeches_df, descr_df, on='speech_id').fillna(0)
The text was updated successfully, but these errors were encountered:
In hist3368-week5-plotting-change-over-time/hist3368-week5-access-data.ipynb, there is a typo. Under the US Congress heading in the
read_csv
function the argumentwarning_bad_lines
should bewarn_bad_lines
.The code should be:
The text was updated successfully, but these errors were encountered: