What does the phrase “a long (or hard) row to hoe” mean and Where does it come from?

The phrase “a long (or hard) row to hoe” means: A difficult or tedious task to perform; a dreary prospect to face.

An American expression of obvious source, and there are few tasks more dispiriting to face than to start hoeing weeds from a long, long row of beans, say, or to hill a row of corn that seems to stretch ahead interminably.

First to use the figurative sense in print was David Crockett, in his book with the lengthy title, An Account of Col. Crockett’s Tour to the North and Down East, in the Year of the Lord One Thousand Eight Hundred and Thirty-four (1835): “I never opposed Andrew Jackson for the sake of popularity. I knew it was a hard row to hoe, but I stood up to the rack.”