{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"How to replace pandas-td","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"how-to-replace-pandas-td","__idx":0},"children":["How to replace pandas-td"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pandas TD is no longer maintained, we recommend you to switch to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["pytd"]}," by following the porting guide below."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["pytd"]}," offers ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/pandas-td"},"children":["pandas-td"]}," compatible functions that provide the same functionalities more efficiently."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"installing","__idx":1},"children":["Installing"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you have not already installed pytd then do so."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"pip install pytd\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration","__idx":2},"children":["Configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Change from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pandas_td"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pytd.pandas_td"]}," in your import statements and when you load the ipython extensions."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Before"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import pandas_td as td\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"shell","header":{"controls":{"copy":{}}},"source":"In [1]: %%load_ext pandas_td.ipython\n","lang":"shell"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["After"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import pytd.pandas_td as td\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ipython","header":{"controls":{"copy":{}}},"source":"In [1]: %%load_ext pytd.pandas_td.ipython\n","lang":"ipython"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After these configuration changes, all ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pandas_td"]}," code should keep running correctly with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pytd"]},"."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There is a known difference with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pandas_td.to_td"]}," function for type conversion. Since ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pytd.writer.BulkImportWriter"]},", default writer in pytd, uses CSV as an intermediate file before uploading a table, column type may change via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pandas.read_csv"]},". To respect column type as much as possible, you need to pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fmt=\"msgpack\""]}," argument to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to_td"]}," function."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more detail, see ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fmt"]}," option of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pytd.pandas_td.to_td()"]},"."]}]}]},"headings":[{"value":"How to replace pandas-td","id":"how-to-replace-pandas-td","depth":1},{"value":"Installing","id":"installing","depth":2},{"value":"Configuration","id":"configuration","depth":2}],"frontmatter":{"seo":{"title":"How to replace pandas-td"}},"lastModified":"2026-02-17T01:46:37.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/tools/pytd/porting-pandas","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}