@@ -180,7 +180,6 @@ class DataFrame(NDFrame):
180180 --------
181181 DataFrame.from_records : constructor from tuples, also record arrays
182182 DataFrame.from_dict : from dicts of Series, arrays, or dicts
183- DataFrame.from_csv : from CSV files
184183 DataFrame.from_items : from sequence of (key, value) pairs
185184 pandas.read_csv, pandas.read_table, pandas.read_clipboard
186185 """
@@ -1059,13 +1058,29 @@ def from_csv(cls, path, header=0, sep=',', index_col=0,
10591058 parse_dates = True , encoding = None , tupleize_cols = False ,
10601059 infer_datetime_format = False ):
10611060 """
1062- Read delimited file into DataFrame
1061+ Read CSV file (DISCOURAGED, please use :func:`pandas.read_csv` instead).
1062+
1063+ It is preferable to use the more powerful :func:`pandas.read_csv`
1064+ for most general purposes, but ``from_csv`` makes for an easy
1065+ roundtrip to and from a file (the exact counterpart of
1066+ ``to_csv``), especially with a DataFrame of time series data.
1067+
1068+ This method only differs from the preferred :func:`pandas.read_csv`
1069+ in some defaults:
1070+
1071+ - `index_col` is ``0`` instead of ``None`` (take first column as index
1072+ by default)
1073+ - `parse_dates` is ``True`` instead of ``False`` (try parsing the index
1074+ as datetime by default)
1075+
1076+ So a ``pd.DataFrame.from_csv(path)`` can be replaced by
1077+ ``pd.read_csv(path, index_col=0, parse_dates=True)``.
10631078
10641079 Parameters
10651080 ----------
10661081 path : string file path or file handle / StringIO
10671082 header : int, default 0
1068- Row to use at header (skip prior rows)
1083+ Row to use as header (skip prior rows)
10691084 sep : string, default ','
10701085 Field delimiter
10711086 index_col : int or sequence, default 0
@@ -1081,15 +1096,14 @@ def from_csv(cls, path, header=0, sep=',', index_col=0,
10811096 datetime format based on the first datetime string. If the format
10821097 can be inferred, there often will be a large parsing speed-up.
10831098
1084- Notes
1085- -----
1086- Preferable to use read_table for most general purposes but from_csv
1087- makes for an easy roundtrip to and from file, especially with a
1088- DataFrame of time series data
1099+ See also
1100+ --------
1101+ pandas.read_csv
10891102
10901103 Returns
10911104 -------
10921105 y : DataFrame
1106+
10931107 """
10941108 from pandas .io .parsers import read_table
10951109 return read_table (path , header = header , sep = sep ,
0 commit comments