Creating a data frame from excel. pd.read_csv(path, index_col=0,parse_dates=True).
example: df = pd.read_csv('small_data/fha_by_tract.csv', names=names) df.head() Best Regards - Naren > On Feb 9, 2018, at 9:00 AM, tutor-requ...@python.org wrote: > > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, send a message with subject or body 'help' to > tutor-requ...@python.org > > You can reach the person managing the list at > tutor-ow...@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Tutor digest..." > Today's Topics: > > 1. Creating a DataFrame from excel file (Charlotte Hoff Sonne) > 2. Re: Creating a DataFrame from excel file (Mark Lawrence) > > From: Charlotte Hoff Sonne <charlotte.so...@hotmail.com> > Subject: [Tutor] Creating a DataFrame from excel file > Date: February 8, 2018 at 1:23:09 PM PST > To: "tutor@python.org" <tutor@python.org> > > > I wish to create a very large data frame with pandas. So far, I have learned > how to create data frames by manually entering the values I want in my data > frame. However, now I have a large dataset from excel that I want to get > imported as a data frame in jupyter notebook. Initially i wrote the following > code: > > pd.read_excel(“…”) > > But this is not a data frame, is it? Can I convert my excel file to a data > frame? > > > From: Mark Lawrence <breamore...@gmail.com> > Subject: Re: [Tutor] Creating a DataFrame from excel file > Date: February 9, 2018 at 8:35:15 AM PST > To: tutor@python.org > > > On 08/02/18 21:23, Charlotte Hoff Sonne wrote: >> I wish to create a very large data frame with pandas. So far, I have learned >> how to create data frames by manually entering the values I want in my data >> frame. However, now I have a large dataset from excel that I want to get >> imported as a data frame in jupyter notebook. Initially i wrote the >> following code: >> pd.read_excel(“…”) >> But this is not a data frame, is it? Can I convert my excel file to a data >> frame? > > https://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_excel.html > states quite clearly "Read an Excel table into a pandas DataFrame" so you > just have to assign the return value from the call to a variable. > > -- > My fellow Pythonistas, ask not what our language can do for you, ask > what you can do for our language. > > Mark Lawrence > > > > > _______________________________________________ > Tutor maillist - Tutor@python.org > https://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor