The definition formula for $c$-index? I'm sorry if this question sounds trivial or is a duplicate, but I could't find a definition formula for the $c$-index. There are numerous questions and answers about it, but all I have skimmed assume that the reader knows how to compute it or has the software for that purpose.
I've read that for binary outcome it is equivalent to the area under the ROC curve. But I have an ordinal model, with more than two levels.
So, can someone please post, in a simple and concise answer, the formula defining the $c$-index, as used in ordinal regression with uncensored data?
P.S. I would also appreciate if someone could point me to a Python library which can compute the index and which works well with statsmodels.

Frank Harrell explains on this page. With outcomes $Y$ and paired predictor values $X$, the C-index is the fraction of comparable pairs of ($X,Y$) values in which the predicted (from $X$) and observed $Y$-value order is correct.
With Harrell's rms package, you back-calculate the C-index from the reported discrimination index Somers' $D_{xy}$, "the difference between the number of concordant and discordant pairs [in ordering of $Y$ and $X$], divided by the number of pairs with $X$ values in the pair being unequal." Wikipedia. The relationship between these discrimination measures is $D_{xy} = 2\times (C - \frac{1}{2})$.
Absent censoring, the comparable pairs are those without ties. With right censoring of outcomes as in survival models, you can include an ($X,Y$) pair in such comparisons up to the point at which $Y$ is right censored.
Software-specific questions are off-topic on this site and I don't use Python, but if there's a function for Somers' D somewhere in the Python universe you are all set.
