Finely chop onion and add to bowl. Add egg, salt, pepper and flour and mix to combine.
Heat frying pan over medium high heat. Add enough oil for frying, about 1-inch deep.
Once oil is hot spoon potato mixture by the tablespoon into pan. Fry until golden, flip and fry the other side. Remove to a paper towel-lined tray, serve with sour cream.