Skip to content

Commit 9aa5777

Browse files
committed
Profiler: avoid using Optional and use 0 default for numRecords
1 parent 825cbcb commit 9aa5777

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pydeequ/profiles.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
""" Profiles file for all the Profiles classes in Deequ"""
33
import json
44
from collections import namedtuple
5-
from typing import Optional
65

76
from pyspark.sql import DataFrame, SparkSession
87
from pydeequ.analyzers import KLLParameters
@@ -239,7 +238,7 @@ def __init__(self, spark_session: SparkSession):
239238
self._sc = spark_session.sparkContext
240239
self._jvm = spark_session._jvm
241240
self._profiles = []
242-
self._numRecords = None
241+
self._numRecords = 0
243242
self.columnProfileClasses = {
244243
"StandardColumnProfile": StandardColumnProfile,
245244
"StringColumnProfile": StandardColumnProfile,
@@ -270,7 +269,7 @@ def profiles(self):
270269
return self._profiles
271270

272271
@property
273-
def numRecords(self) -> Optional[int]:
272+
def numRecords(self) -> int:
274273
"""
275274
A getter for the number of records
276275

0 commit comments

Comments
 (0)