Table:
0
A
B
C
D
E
F
1
District
Incumbent
Party
First elected
Result
Candidates
2
Pennsylvania 1
Robert Waln
Federalist
1798 (Special)
Retired Democratic-Republican gain
William Jones (DR) 50.2% Francis Gurney (F) 49.8%
3
Pennsylvania 2
Michael Leib
Democratic-Republican
1798
Re-elected
Michael Leib (DR) 77.8% John Lardner (F) 22.2%
4
Pennsylvania 5
Joseph Hiester
Democratic-Republican
1797 (Special)
Re-elected
Joseph Hiester (DR) 83.2% Roswell Wells (F) 16.8%
5
Pennsylvania 6
John A. Hanna
Democratic-Republican
1796
Re-elected
John A. Hanna (DR) 74.6% Samuel Maclay (F) 25.4%
6
Pennsylvania 7
John W. Kittera
Federalist
1791
Retired Federalist hold
Thomas Boude (F) 54.1% John Whitehill (DR) 45.9%
7
Pennsylvania 8
Thomas Hartley
Federalist
1788
Retired Democratic-Republican gain
John Stewart (DR) 54.8% John Eddie (F) 45.2%
8
Pennsylvania 9
Andrew Gregg
Democratic-Republican
1791
Re-elected
Andrew Gregg (DR) 72.6% David Mitchell (F) 27.4%
9
Pennsylvania 10
Henry Woods
Federalist
1798
Re-elected
Henry Woods (F) 53.6% David Bard (DR) 46.4%

Questions and formulas:
Question: How many incumbents are there in Pennsylvania 5?
Formula: ROWS(UNIQUE(FILTER(B1, A1="Pennsylvania 5")))
Formula2: ROWS(UNIQUE(FILTER(B2:B9, A2:A9="Pennsylvania 5")))
Level: medium
Question: What are the parties listed for Pennsylvania 8?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,A1="Pennsylvania 8"),3))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F9,A2:A9="Pennsylvania 8"),3))
Level: medium
Question: Name the incumbent for candidates Joseph Hiester (dr) 83.2% Roswell Wells (f) 16.8%.
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,F1="Joseph Hiester (DR) 83.2% Roswell Wells (F) 16.8%"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F9,F2:F9="Joseph Hiester (DR) 83.2% Roswell Wells (F) 16.8%"),2))
Level: medium
Question: What was the result for Andrew Gregg?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,B1="Andrew Gregg"),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F9,B2:B9="Andrew Gregg"),5))
Level: medium
Question: What was the result for Pennsylvania 8?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,A1="Pennsylvania 8"),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F9,A2:A9="Pennsylvania 8"),5))
Level: medium