Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 2 decimal points for Cost, rounding up #36

Merged
merged 1 commit into from
May 1, 2024

Conversation

knikolla
Copy link
Contributor

@knikolla knikolla commented May 1, 2024

Switches the precision of Cost from 3 to 2. The value is rounded up as demontrated by the following block of code given the following csv file.

Cost
123.1234
123.5678
>>> dataframe = pandas.read_csv("csv.csv", dtype={"Cost": pandas.ArrowDtype(pyarrow.decimal128(12, 2))})
>>> dataframe
     Cost
0  123.12
1  123.57

Related #35

Switches the precision of Cost from 3 to 2. The value is rounded
up as demontrated by the following block of code given the following
csv file.

```csv
Cost
123.1234
123.5678
```

```python
>>> dataframe = pandas.read_csv("csv.csv", dtype={"Cost": pandas.ArrowDtype(pyarrow.decimal128(12, 2))})
>>> dataframe
     Cost
0  123.12
1  123.57
```

Related CCI-MOC#35
Copy link
Collaborator

@naved001 naved001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we be explicit about the rounding method used?

Copy link
Collaborator

@naved001 naved001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the rounding should probably happen in the source CSV reports. So, this PR should be okay as long as we agree on that.

@knikolla
Copy link
Contributor Author

knikolla commented May 1, 2024

Can we be explicit about the rounding method used?

@naved001 I surprisingly didn't find anything about how to change that or make it explicit.

@knikolla knikolla merged commit 2b04771 into CCI-MOC:main May 1, 2024
2 checks passed
@knikolla knikolla deleted the decimals_2 branch May 1, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants