是否可以在不打开 CSV 文件的情况下获取行数? [英] Is it possible to get the number of rows in a CSV file without opening it?

查看:31
本文介绍了是否可以在不打开 CSV 文件的情况下获取行数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大约 1 GB 的 CSV 文件,由于我的笔记本电脑是基本配置,我无法在 Excel 或 R 中打开该文件.但出于好奇,我想获得文件中的行.如果我能做到,我该怎么做?

I have a CSV file of size ~1 GB, and as my laptop is of basic configuration, I'm not able to open the file in Excel or R. But out of curiosity, I would like to get the number of rows in the file. How am I to do it, if at all I can do it?

推荐答案

对于 Linux/Unix:

For Linux/Unix:

wc -l filename

对于 Windows:

For Windows:

find /c /v "A String that is extremely unlikely to occur" filename

这篇关于是否可以在不打开 CSV 文件的情况下获取行数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆