diff --git a/pins/boards.py b/pins/boards.py index 8f1f41d0..f06ccb1e 100644 --- a/pins/boards.py +++ b/pins/boards.py @@ -600,10 +600,12 @@ class BoardManual(BaseBoard): ['df_csv'] >>> board.pin_read("df_csv") - y z - x - 1 a 3 - 2 b 4 + x y z + 0 1 a 3 + 1 2 b 4 + + + """ diff --git a/pins/constructors.py b/pins/constructors.py index 386e774e..fe8face6 100644 --- a/pins/constructors.py +++ b/pins/constructors.py @@ -197,10 +197,10 @@ def board_github( ['df_arrow', 'df_csv', 'df_rds', 'df_unversioned'] >>> board.pin_read("df_csv") - y z - x - 1 a 3 - 2 b 4 + x y z + 0 1 a 3 + 1 2 b 4 + """ diff --git a/pins/drivers.py b/pins/drivers.py index 48d3b268..6b7334af 100644 --- a/pins/drivers.py +++ b/pins/drivers.py @@ -57,7 +57,7 @@ def load_data( if meta.type == "csv": import pandas as pd - return pd.read_csv(fs.open(path_to_file), index_col=0) + return pd.read_csv(fs.open(path_to_file)) elif meta.type == "joblib": import joblib @@ -90,7 +90,7 @@ def save_data( raise NotImplementedError( "Currently only pandas.DataFrame can be saved to a CSV." ) - obj.to_csv(fname) + obj.to_csv(fname, index=False) elif type == "joblib": import joblib diff --git a/pins/tests/_snapshots/test_board_pin_write_rsc_index_html/data.txt b/pins/tests/_snapshots/test_board_pin_write_rsc_index_html/data.txt index 702c1fb8..49d5f17c 100644 --- a/pins/tests/_snapshots/test_board_pin_write_rsc_index_html/data.txt +++ b/pins/tests/_snapshots/test_board_pin_write_rsc_index_html/data.txt @@ -2,8 +2,8 @@ api_version: 1 created: 20200113T235859Z description: some description file: test_rsc_pin.csv -file_size: 23 -pin_hash: 60d4c36d7138cb6c +file_size: 16 +pin_hash: d6820e2d11300a70 title: some pin type: csv user: {} diff --git a/pins/tests/_snapshots/test_board_pin_write_rsc_index_html/index.html b/pins/tests/_snapshots/test_board_pin_write_rsc_index_html/index.html index e522dbec..4ffea264 100644 --- a/pins/tests/_snapshots/test_board_pin_write_rsc_index_html/index.html +++ b/pins/tests/_snapshots/test_board_pin_write_rsc_index_html/index.html @@ -45,8 +45,8 @@