def read_csv_folder(spark, folder, **kwargs):
    """Read a csv folder of Spark format.
    
    Args:
        folder (str): Folder path.
    
    Returns:
        spark.DataFrame: An dataframe.
    
    Examples:
        >>> path = os.path.join("share", "traj_spark")
        >>> df = read_csv_folder(spark, path, header=True, inferSchema=True)
        >>> df.orderBy("t").head(2)
        [Row(t=0.0416667, q0=443, q1=205), Row(t=0.0833333, q0=444, q1=206)]
        >>> df.schema
        StructType(List(StructField(t,DoubleType,true),StructField(q0,IntegerType,true),StructField(q1,IntegerType,true)))
    """
    return spark.read.csv(folder, **kwargs)