Slang Etymology: A "card" is an entertaining person?

What is the etomology of the word “card” when it is used to mean an odd or entertaining person? I’ve been familiar with this meaning for years - my Grandfather used to use it. But I’m not sure how this bit of slang developed. Any thoughts?

There doesn’t appear to be a clear answer, although most speculation is that it comes either from playing cards or from carding wool. It was used in several works by Charles Dickens.

The most famous use of the word is in a novel by Arnold Bennett:

https://en.wikipedia.org/wiki/The_Card

It was later made into a film:

https://en.wikipedia.org/wiki/The_Card_(1952_film)

The OED indicates it probably comes from the phrase “sure card,” meaning something that is certain to succeed. Dickens is the first person quoted in the sense you’re asking. It seemed to have evolved from “sure card” to something like “odd card” to just plain “card.”

Etymonline thinks it knows:

ETA: Ninja’ed by RealityChuck