Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Steve Samuels <sjsamuels@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: why messy when importing a csv file? |

Date |
Thu, 6 May 2010 13:20:09 -0400 |

Sorry for the blank. I agree with Nick that there are problems with the csv file. You also will need a "double" option, because of the the 26 billion dollar entry insheet using firms.csv, double format a001101000 %20.2fc Steve > On Thu, May 6, 2010 at 1:10 PM, Nick Cox <n.j.cox@durham.ac.uk> wrote: >> Three points: >> >> 1. I don't think that this kind of behaviour can in any sense be >> inferred or even guessed from your description "messy". Thus you wasted >> your previous email, and the time anyone spent reading it and pondering >> a reply. >> >> 2. I copied your file fragment previously posted and did not get this >> behaviour. >> >> 3. You should inspect your file for strange characters using a decent >> text editor or Stata's -hexdump- or Stata's -type-. Just because it is >> called .csv doesn't mean that much. There could be other stuff in it >> too. >> >> Nick >> n.j.cox@durham.ac.uk >> >> Jessie Grace >> >> Neil, >> the results are as follows. There are only one variable named v1 and 23 >> observations the number of which is not equal to my csv file. More, all >> values of the observations are blank. >> >> . list >> +----+ >> | v1 | >> |----| >> 1. | | >> 2. | | >> 3. | | >> 4. | | >> 5. | | >> |----| >> 6. | | >> 7. | | >> 8. | | >> 9. | | >> 10. | | >> |----| >> 11. | | >> 12. | | >> 13. | | >> 14. | | >> 15. | | >> |----| >> 16. | | >> 17. | | >> 18. | | >> 19. | | >> 20. | | >> |----| >> 21. | | >> 22. | | >> 23. | | >> +----+ >> >>> From: nshephard@gmail.com >>> >>> On Thu, May 6, 2010 at 4:47 PM, Jessie Grace wrote: >>>> Dear statalists, >>>> >>>> I have a .csv file, which consists of the following. >>>> >>>> Stkcd,Accper,A001101000 >>>> 000002,"1999-06-30",468010960.13 >>>> 000002,"2002-09-30",1166858479.70 >>>> 000002,"2000-01-01",772831829.15 >>>> 000002,"2000-06-30",911966043.54 >>>> 000002,"2000-12-31",995745160.05 >>>> 000002,"2009-03-31",26921921879.80 >>>> 000002,"1997-06-30",0 >>>> 000002,"1991-12-31",88628783.34 >>>> 000002,"1992-12-31",204653478.04 >>>> 000003,"1998-12-31",120946052.36 >>>> >>>> The first row contains variables names. The characteristic of the >> file is the contents of each row are in the same cell. >>>> No matter I typed "insheet using firms.csv" or "insheet using >> firms.csv,comma", the importing results are messy. >>> >>> What does "messy" look like? If you could -list- the data and copy >>> and paste it to the list then... >>> >>>> Could anyone tell me why and how to solve? >>> >>> ...this might be more achievable, otherwise its just guessing. >> >> * >> * For searches and help try: >> * http://www.stata.com/help.cgi?search >> * http://www.stata.com/support/statalist/faq >> * http://www.ats.ucla.edu/stat/stata/ >> > > > > -- > Steven Samuels > sjsamuels@gmail.com > 18 Cantine's Island > Saugerties NY 12477 > USA > Voice: 845-246-0774 > Fax: 206-202-4783 > -- Steven Samuels sjsamuels@gmail.com 18 Cantine's Island Saugerties NY 12477 USA Voice: 845-246-0774 Fax: 206-202-4783 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**RE: st: why messy when importing a csv file?***From:*Jessie Grace <gracejessie@hotmail.com>

**References**:**st: why messy when importing a csv file?***From:*Jessie Grace <gracejessie@hotmail.com>

**Re: st: why messy when importing a csv file?***From:*Neil Shephard <nshephard@gmail.com>

**RE: st: why messy when importing a csv file?***From:*Jessie Grace <gracejessie@hotmail.com>

**RE: st: why messy when importing a csv file?***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: why messy when importing a csv file?***From:*Steve Samuels <sjsamuels@gmail.com>

- Prev by Date:
**RE: st: RE: why messy when importing a csv file?** - Next by Date:
**RE: st: RE: why messy when importing a csv file?** - Previous by thread:
**Re: st: why messy when importing a csv file?** - Next by thread:
**RE: st: why messy when importing a csv file?** - Index(es):