We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ca920b commit fea9df8Copy full SHA for fea9df8
python/pyspark/sql/readwriter.py
@@ -242,10 +242,12 @@ def csv(self, paths):
242
243
:param paths: string, or list of strings, for input path(s).
244
245
- >>> df = sqlContext.read.csv('python/test_support/sql/ages.csv')
+ >>> df = sqlContext.read.option("inferSchema", "true").csv('python/test_support/sql/ages.csv')
246
>>> df.dtypes
247
- [('C0', 'string'), ('C1', 'bigint')]
+ [('C0', 'string'), ('C1', 'int')]
248
"""
249
+ if isinstance(paths, basestring):
250
+ paths = [paths]
251
return self._df(self._jreader.csv(self._sqlContext._sc._jvm.PythonUtils.toSeq(paths)))
252
253
@since(1.5)
0 commit comments