# Expect\_column\_values\_to\_not\_be\_null column not showing up when column contains some null values

**URL:** <https://discourse.greatexpectations.io/t/expect-column-values-to-not-be-null-column-not-showing-up-when-column-contains-some-null-values/1593>\
**Category:** GX Core Support\
**Tags:** help-wanted\
**Created:** [January 23, 2024, 9:50pm UTC](https://discourse.greatexpectations.io/t/expect-column-values-to-not-be-null-column-not-showing-up-when-column-contains-some-null-values/1593 "2024-01-23T21:50:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vavass18](https://avatars.discourse-cdn.com/v4/letter/v/e36b37/32.png) [@vavass18](https://discourse.greatexpectations.io/u/vavass18)\
**Post date:** [January 23, 2024, 9:50pm UTC](https://discourse.greatexpectations.io/t/expect-column-values-to-not-be-null-column-not-showing-up-when-column-contains-some-null-values/1593/1 "2024-01-23T21:50:09Z")

</div>

When using the example dataset, I am trying to run this line of code on the “congestion\_surcharge” column which is of type float64 and has some null values in the column: `validator.expect_column_values_to_not_be_null("congestion_surcharge")`

However, it doesn’t show up in the data doc html page, but the column " total\_amount" shows up without any problems. See picture below.

 ![Screenshot 2024-01-23 at 4.39.33 PM](https://canada1.discourse-cdn.com/flex031/uploads/greatexpectations/original/1X/703939c39800c186d31aa59d832e8b7d9d4de933.png)

```auto
#create expectations
validator.expect_column_values_to_not_be_null("pickup_datetime")
validator.expect_column_values_to_not_be_null("congestion_surcharge")
validator.expect_column_values_to_not_be_null("total_amount")
validator.expect_column_values_to_be_between(
    "passenger_count", min_value=1, max_value=6
)
validator.save_expectation_suite()

```

Code Snippet

```auto
Data columns (total 18 columns):
 # Column Non-Null Count Dtype  
--- ------ -------------- -----  
 0 vendor_id 10000 non-null int64  
 1 pickup_datetime 10000 non-null object 
 2 dropoff_datetime 10000 non-null object 
 3 passenger_count 10000 non-null int64  
 4 trip_distance 10000 non-null float64
 5 rate_code_id 10000 non-null int64  
 6 store_and_fwd_flag 10000 non-null object 
 7 pickup_location_id 10000 non-null int64  
 8 dropoff_location_id 10000 non-null int64  
 9 payment_type 10000 non-null int64  
 10 fare_amount 10000 non-null float64
 11 extra 10000 non-null float64
 12 mta_tax 10000 non-null float64
 13 tip_amount 10000 non-null float64
 14 tolls_amount 10000 non-null float64
 15 improvement_surcharge 10000 non-null float64
 16 total_amount 10000 non-null float64
 17 congestion_surcharge 3673 non-null float64

```

Column Data Types

For other int64, object (with no null values) and float64 (with no null values) types the same expectation is working without any issues. It seems like with this expectation, when a column contains some null values it will not show up in the data docs html page. Has anyone else encountered this problem? Thank you in advance!

---

<div class="post-metadata">

**Author:** ![HaebichanGX](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.greatexpectations.io/haebichangx/32/211_2.png) [@HaebichanGX](https://discourse.greatexpectations.io/u/HaebichanGX)\
**Post date:** [January 24, 2024, 3:45pm UTC](https://discourse.greatexpectations.io/t/expect-column-values-to-not-be-null-column-not-showing-up-when-column-contains-some-null-values/1593/2 "2024-01-24T15:45:24Z")

</div>

Hi @vavass18 this is because you need to run validator.expect\_column\_values\_to\_not\_be\_null(“congestion\_surcharge”, discard\_failed\_expectations = False).

It’s not showing up because congestion\_surcharge failed in expectations.

---

<div class="post-metadata">

**Author:** ![vavass18](https://avatars.discourse-cdn.com/v4/letter/v/e36b37/32.png) [@vavass18](https://discourse.greatexpectations.io/u/vavass18)\
**Post date:** [January 24, 2024, 5:48pm UTC](https://discourse.greatexpectations.io/t/expect-column-values-to-not-be-null-column-not-showing-up-when-column-contains-some-null-values/1593/3 "2024-01-24T17:48:07Z")

</div>

Hi @HaebichanGX,

The above solution didn’t work. However adding the option to the “save\_expectation\_suite” function worked (see code below)!

`validator.save_expectation_suite(discard_failed_expectations = False)`

Thank you for your help!
