@@ -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 """
@@ -1052,13 +1051,29 @@ def from_csv(cls, path, header=0, sep=',', index_col=0,
10521051 parse_dates = True , encoding = None , tupleize_cols = False ,
10531052 infer_datetime_format = False ):
10541053 """
1055- Read delimited file into DataFrame
1054+ Read CSV file (DISCOURAGED, please use :func:`pandas.read_csv` instead).
1055+
1056+ It is preferable to use the more powerful :func:`pandas.read_csv`
1057+ for most general purposes, but ``from_csv`` makes for an easy
1058+ roundtrip to and from a file (the exact counterpart of
1059+ ``to_csv``), especially with a DataFrame of time series data.
1060+
1061+ This method only differs from the preferred :func:`pandas.read_csv`
1062+ in some defaults:
1063+
1064+ - `index_col` is ``0`` instead of ``None`` (take first column as index
1065+ by default)
1066+ - `parse_dates` is ``True`` instead of ``False`` (try parsing the index
1067+ as datetime by default)
1068+
1069+ So a ``pd.DataFrame.from_csv(path)`` can be replaced by
1070+ ``pd.read_csv(path, index_col=0, parse_dates=True)``.
10561071
10571072 Parameters
10581073 ----------
10591074 path : string file path or file handle / StringIO
10601075 header : int, default 0
1061- Row to use at header (skip prior rows)
1076+ Row to use as header (skip prior rows)
10621077 sep : string, default ','
10631078 Field delimiter
10641079 index_col : int or sequence, default 0
@@ -1074,15 +1089,14 @@ def from_csv(cls, path, header=0, sep=',', index_col=0,
10741089 datetime format based on the first datetime string. If the format
10751090 can be inferred, there often will be a large parsing speed-up.
10761091
1077- Notes
1078- -----
1079- Preferable to use read_table for most general purposes but from_csv
1080- makes for an easy roundtrip to and from file, especially with a
1081- DataFrame of time series data
1092+ See also
1093+ --------
1094+ pandas.read_csv
10821095
10831096 Returns
10841097 -------
10851098 y : DataFrame
1099+
10861100 """
10871101 from pandas .io .parsers import read_table
10881102 return read_table (path , header = header , sep = sep ,
0 commit comments