View Single Post
Old 07-01-2021, 06:24 PM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,453
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Courge View Post
Hello,

I created a custom column "Words" that I fill with the FanFicFare plugin (collecting the number of words from the fanfiction website). Is there a method to format the numbers in kilo? For example, 1500 as 1.5k or 34267 as 34.3k.

I noticed that python format can be used to format custom column but it does not allow python function which would be needed for what I want (see the page https://www.geeksforgeeks.org/python-numerize-library/).

Thank you!
You can't do what you want with the format option on the integer custom column. You can do what you want using a composite column (column built from other columns) with a template that computes what you want to see. You would hide the column filled in by FanFicFare and display the composite.

As for formatting the result in the composite, you have the option of using the human_readable() function or doing the arithmetic yourself.
chaley is offline   Reply With Quote