Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fillna() on CAS column not working #173

Copy link
Copy link
@j-honnacker

Description

@j-honnacker
Issue body actions

If I create a CAS table with missing values...

import pandas as pd
import numpy as np

df = pd.DataFrame(dict(amount=[35,40], tip=[3.5,np.nan]))

tbl = conn.upload_frame(df, casout=dict(name="test", caslib="casuser", replace=True))

...the .fillna() method does not replace the missing values:

tbl2 = tbl
tbl2['test'] = tbl2['tip].fillna(0)

image

tbl3 = tbl
tbl3['test'] = tbl3['tip'].fillna(0, inplace=True)

image

Is there any workaround? In this case, I want to add amount with tip and save the result in total_amount:

tbl['total_amount'] = tbl['amount'] + tbl['tip'].fillna(0)
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.