@@ -1124,7 +1124,7 @@ def from_values(
11241124 def _func_fr () -> Iterator [tuple_type ]: # type: ignore[valid-type]
11251125 yield from tuples
11261126
1127- chain = DataChain .create_empty (DataChain .DEFAULT_FILE_RECORD , session = session )
1127+ chain = DataChain .from_records (DataChain .DEFAULT_FILE_RECORD , session = session )
11281128 if object_name :
11291129 output = {object_name : DataChain ._dict_to_data_model (object_name , output )} # type: ignore[arg-type]
11301130 return chain .gen (_func_fr , output = output )
@@ -1441,22 +1441,23 @@ def to_parquet(
14411441 )
14421442
14431443 @classmethod
1444- def create_empty (
1444+ def from_records (
14451445 cls ,
14461446 to_insert : Optional [Union [dict , list [dict ]]],
14471447 session : Optional [Session ] = None ,
14481448 ) -> "DataChain" :
1449- """Create empty chain. Returns a chain. This method is used for programmatically
1450- generating a chains in contrast of reading data from storages or other sources.
1449+ """Create a DataChain from the provided records. This method can be used for
1450+ programmatically generating a chain in contrast of reading data from storages
1451+ or other sources.
14511452
14521453 Parameters:
14531454 to_insert : records (or a single record) to insert. Each record is
14541455 a dictionary of signals and theirs values.
14551456
14561457 Example:
14571458 ```py
1458- empty = DataChain.create_empty ()
1459- single_record = DataChain.create_empty (DataChain.DEFAULT_FILE_RECORD)
1459+ empty = DataChain.from_records ()
1460+ single_record = DataChain.from_records (DataChain.DEFAULT_FILE_RECORD)
14601461 ```
14611462 """
14621463 session = Session .get (session )
0 commit comments