I think I found the answer, but if you go to the source code "eth.py", function signature says it's returning "Wei":
def estimateGas(self, transaction: TxParams, block_identifier: BlockIdentifier=None) -> Wei:
This is actually very misleading. I tested this out. It returned "239231", but in what unit? You should interpret the number as follows:
gas_estimate
239231
gas_price = w3.eth.gasPrice
gas_price
5000000000000
gas_estimate_wei = gas_estimate * gas_price
gas_estimate_wei
1196155000000000000
gas_estimate_in_coin = gas_estimate_wei / (1000000000 * 1000000000)
gas_estimate_in_coin
1.196155
How you should interpret the numbers are as follows:
gas_estimate = 239231 units
gas_price = 5000,000,000,000 wei per unit
Or
gas_price = 5000 gwei per unit
So, "gas_estimate_in_coin" = 1.196155. Now, what "coin"? It depends on the chain you're interacting with. If you're interacting with CRONOS, that's 1.196155 CRO, which is about 49.9 cents in USD (CROUSDT = 0.4168 on 20220413)! On the other hand, on Ethereum mainnet, that's 1.196155 ETH, which changed everything!!!
References
(Wei, Gwei, ETH conversion)
https://web3py.readthedocs.io/en/stable/web3.eth.html?highlight=estimate_gas#web3.eth.Eth.estimate_gas
https://blog.oasis.app/gas-fees-a-small-guide/
https://www.thebalance.com/gwei-5194614
https://norman-lm-fung.medium.com/interact-with-cronos-single-usdc-lp-with-web3-py-1e14c62a0d9c
Similar question: Smart Contract - approve function: wad
web3.eth.getGasPrice. – bru53001 May 27 '21 at 10:06estimateGaswithgetGasPricefor a transaction's total fee in wei. – bru53001 May 28 '21 at 03:47