<small id='zn1Nr'></small><noframes id='zn1Nr'>

          <bdo id='zn1Nr'></bdo><ul id='zn1Nr'></ul>
      1. <legend id='zn1Nr'><style id='zn1Nr'><dir id='zn1Nr'><q id='zn1Nr'></q></dir></style></legend>

      2. <i id='zn1Nr'><tr id='zn1Nr'><dt id='zn1Nr'><q id='zn1Nr'><span id='zn1Nr'><b id='zn1Nr'><form id='zn1Nr'><ins id='zn1Nr'></ins><ul id='zn1Nr'></ul><sub id='zn1Nr'></sub></form><legend id='zn1Nr'></legend><bdo id='zn1Nr'><pre id='zn1Nr'><center id='zn1Nr'></center></pre></bdo></b><th id='zn1Nr'></th></span></q></dt></tr></i><div id='zn1Nr'><tfoot id='zn1Nr'></tfoot><dl id='zn1Nr'><fieldset id='zn1Nr'></fieldset></dl></div>
        <tfoot id='zn1Nr'></tfoot>
      3. 快速查找两个大文本文件之间的差异

        Quickly find differences between two large text files(快速查找两个大文本文件之间的差异)

          <legend id='HTsQy'><style id='HTsQy'><dir id='HTsQy'><q id='HTsQy'></q></dir></style></legend>
        1. <tfoot id='HTsQy'></tfoot>

              <i id='HTsQy'><tr id='HTsQy'><dt id='HTsQy'><q id='HTsQy'><span id='HTsQy'><b id='HTsQy'><form id='HTsQy'><ins id='HTsQy'></ins><ul id='HTsQy'></ul><sub id='HTsQy'></sub></form><legend id='HTsQy'></legend><bdo id='HTsQy'><pre id='HTsQy'><center id='HTsQy'></center></pre></bdo></b><th id='HTsQy'></th></span></q></dt></tr></i><div id='HTsQy'><tfoot id='HTsQy'></tfoot><dl id='HTsQy'><fieldset id='HTsQy'></fieldset></dl></div>

                  <tbody id='HTsQy'></tbody>
                  <bdo id='HTsQy'></bdo><ul id='HTsQy'></ul>

                • <small id='HTsQy'></small><noframes id='HTsQy'>

                • 本文介绍了快速查找两个大文本文件之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有两个 3GB 的文本文件,每个文件大约有 8000 万行.并且它们共享 99.9% 的相同行(文件 A 有 60,000 个唯一行,文件 B 有 80,000 个唯一行).

                  I have two 3GB text files, each file has around 80 million lines. And they share 99.9% identical lines (file A has 60,000 unique lines, file B has 80,000 unique lines).

                  如何在两个文件中快速找到这些独特的行?是否有任何现成的命令行工具可以做到这一点?我正在使用 Python,但我想找到一种有效的 Pythonic 方法来加载文件并进行比较是不太可能的.

                  How can I quickly find those unique lines in two files? Is there any ready-to-use command line tools for this? I'm using Python but I guess it's less possible to find a efficient Pythonic method to load the files and compare.

                  欢迎提出任何建议.

                  推荐答案

                  如果顺序很重要,请尝试 comm 实用程序.如果顺序无关紧要,sort file1 file2 |uniq -u.

                  If order matters, try the comm utility. If order doesn't matter, sort file1 file2 | uniq -u.

                  这篇关于快速查找两个大文本文件之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What happens when you compare 2 pandas Series(当你比较 2 个 pandas 系列时会发生什么)
                  Python - Compare 2 files and output differences(Python - 比较 2 个文件和输出差异)
                  Why do comparisions between very large float values fail in python?(为什么在 python 中非常大的浮点值之间的比较会失败?)
                  Dictionary merge by updating but not overwriting if value exists(字典通过更新合并,但如果值存在则不覆盖)
                  Find entries of one text file in another file in python(在python中的另一个文件中查找一个文本文件的条目)
                  removing an instance of an object in python list(删除python列表中的对象实例)
                  • <bdo id='H361r'></bdo><ul id='H361r'></ul>

                    1. <i id='H361r'><tr id='H361r'><dt id='H361r'><q id='H361r'><span id='H361r'><b id='H361r'><form id='H361r'><ins id='H361r'></ins><ul id='H361r'></ul><sub id='H361r'></sub></form><legend id='H361r'></legend><bdo id='H361r'><pre id='H361r'><center id='H361r'></center></pre></bdo></b><th id='H361r'></th></span></q></dt></tr></i><div id='H361r'><tfoot id='H361r'></tfoot><dl id='H361r'><fieldset id='H361r'></fieldset></dl></div>
                        <tbody id='H361r'></tbody>

                          <small id='H361r'></small><noframes id='H361r'>

                          <tfoot id='H361r'></tfoot>
                            <legend id='H361r'><style id='H361r'><dir id='H361r'><q id='H361r'></q></dir></style></legend>