You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "artsiom-tsaryonau (via GitHub)" <gi...@apache.org> on 2023/03/10 17:59:17 UTC

[GitHub] [arrow] artsiom-tsaryonau opened a new issue, #34533: [Python] Rescaling Decimal128 value would cause data loss

artsiom-tsaryonau opened a new issue, #34533:
URL: https://github.com/apache/arrow/issues/34533

   ### Describe the usage question you have. Please include as many useful details as  possible.
   
   
   I have a dataframe that I want to convert to parquet file with pyarrow schema
   
   The piece of code that does that looks like this
   ```
   df = DataFrame({
       "BOOKG_AMT_XCHG_RATE_NMRC": [79812042284098215031627424085742912847.808901592419987254]
   })
   df[['BOOKG_AMT_XCHG_RATE_NMRC']] = df[['BOOKG_AMT_XCHG_RATE_NMRC']].applymap(str).applymap(Decimal)
   df.to_parquet(parquet_file, schema=pa.schema([('BOOKG_AMT_XCHG_RATE_NMRC', pa.decimal128(38, 18))]))
   ```
   
   And when run it triggers _Rescaling Decimal128 value would cause data loss_ error.
   
   What might be the problem? 
   
   ### Component(s)
   
   Parquet, Python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] artsiom-tsaryonau closed issue #34533: [Python] Rescaling Decimal128 value would cause data loss

Posted by "artsiom-tsaryonau (via GitHub)" <gi...@apache.org>.
artsiom-tsaryonau closed issue #34533: [Python] Rescaling Decimal128 value would cause data loss
URL: https://github.com/apache/arrow/issues/34533


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org