Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

ASCII notebooks #1

Merged
merged 4 commits into from
Aug 19, 2014
Merged

ASCII notebooks #1

merged 4 commits into from
Aug 19, 2014

Conversation

mdmueller
Copy link
Contributor

These will be used for documentation in astropy/astropy#2716.

@taldcroft
Copy link
Member

@amras1 - for consistency with the astropy hierarchy I would suggest putting these under io/ascii instead of just ascii.

@mdmueller
Copy link
Contributor Author

@taldcroft - That makes more sense, I fixed it in the last commit.

@taldcroft
Copy link
Member

@amras1 - the notebooks look OK. The only thing that would be good is to put a title and description / summary of each notebook at the top. E.g.

Compare table read speed for io.ascii, Pandas, and np.genfromtxt

This notebook provides speed comparisons for reading ASCII data tables using a few different methods:

  • io.ascii.read using the legacy pure-Python reader
  • io.ascii.read using the fast C-based reader with the standard string-to-double converter
  • io.ascii.read using the fast C-based reader with a faster string-to-double converter
  • pandas.read_csv
  • numpy.genfromtxt

The data tables themselves are space-delimited tables with variations in length, number of columns, and composition (how many columns of each data type: int, float, str).

Summary
  • The io.ascii fast-C reader with standard conversion is about 3 to 7 times faster than the pure-Python version.
  • Using the fast string-to-double converter makes io.ascii reading comparable in speed to Pandas and sometimes faster.

@mdmueller
Copy link
Contributor Author

@taldcroft - Good idea! The format looks great, I just used your summary above and added similar introductions for the other notebooks.

taldcroft added a commit that referenced this pull request Aug 19, 2014
@taldcroft taldcroft merged commit b5f3bf2 into astropy:master Aug 19, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants