forelegance
V2EX  ›  macOS

Numbers 如何在粘贴 tab 分割的数据时自动填充呢

  •  
  •   forelegance · Mar 11, 2019 · 2057 views
    This topic created in 2631 days ago, the information mentioned may be changed or developed.

    发现Numbers无法自动识别 tab 为分隔符,自动填充多行多列数据到表格中,而是所有内容都粘贴在一个单元格中了。

    本来打算用 python3 转一下,发现automator不支持 python3 脚本。

    大家平时用的时候有什么快捷的方式么?


    哦,知道怎么弄了

    script_content=`cat <<EOF
    import pandas as pd
    dat = pd.read_clipboard(
        sep="\\t", dtype="str",
        header=None,
        na_values="NA", keep_default_na=False, na_filter=False)
    dat.to_clipboard()
    EOF
    `
    cat $SCRIPT | /usr/local/bin/python3 -
    
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6171 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 02:57 · PVG 10:57 · LAX 19:57 · JFK 22:57
    ♥ Do have faith in what you're doing.