Posts

William H. Frankhauser

Image
William Horace Frankhauser (* 5. März 1863 im Wood County, Ohio; † 9. Mai 1921 in Battle Creek, Michigan) war ein US-amerikanischer Politiker. Im Jahr 1921 vertrat er den Bundesstaat Michigan im US-Repräsentantenhaus. Werdegang | Im Jahr 1875 zog William Frankhauser mit seinen Eltern nach Monroe in Michigan, wo er die öffentlichen Schulen besuchte. Danach studierte er an der Michigan State Normal School in Ypsilanti sowie am Oberlin College in Ohio. Anschließend unterrichtete er einige Jahre als Lehrer. Nach einem Jurastudium und seiner im Jahr 1891 erfolgten Zulassung als Rechtsanwalt begann er in Hillsdale in seinem neuen Beruf zu arbeiten. Zwischen 1896 und 1903 fungierte er im dortigen Hillsdale County als Bezirksstaatsanwalt. Politisch war Frankhauser Mitglied der Republikanischen Partei. Bei den Kongresswahlen des Jahres 1920 wurde er im dritten Wahlbezirk von Michigan in das US-Repräsentantenhaus in Washington, D.C. gewählt, wo er am 4....

Pandas dataframe narrow to wide with pivot table no aggregation

Image
2 1 I have a pandas dataframe that contains the iris dataset. I want to subset this dataframe to only include sepal_length and species , and then reshape it so that the columns are the unique values for species and the values are the values for that species. # load data into a dataframe df = pd.read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv') head(df) +----+---------------+--------------+---------------+--------------+---------+ | | sepal_length | sepal_width | petal_length | petal_width | species | +----+---------------+--------------+---------------+--------------+---------+ | 0 | 5.1 | 3.5 | 1.4 | 0.2 | setosa | | 1 | 4.9 | 3.0 | 1.4 | 0.2 | setosa | | 2 | 4.7 | 3.2 | 1.3 | 0.2 | setosa | | 3 | 4.6 | 3.1 | 1.5 | 0.2 | setosa | | 4 | 5.0 | 3.6 | 1.4 | 0.2 | setosa | +----+---------------+--------------+---------------+--------------+---------+ I can do this is I take the data out of Pandas as use a dictionary to reshape the da...