我在熊猫中有两个数据帧:
电影
+---+------------------------------+--------------+-----------+
| | movie title | genre | tconst |
+---+------------------------------+--------------+-----------+
| 0 | Edison Kinetoscopic Record | Documentary | tt0000008 |
+---+------------------------------+--------------+-----------+
| 1 | La sortie des usines Lumière | Documentary | tt0000010 |
+---+------------------------------+--------------+-----------+
| 2 | The Arrival of a Train | Documentary | tt0000012 |
+---+------------------------------+--------------+-----------+
| 3 | The Oxford and Cambridge | NaN | tt0000025 |
+---+------------------------------+--------------+-----------+
| 4 | Le manoir du diable | Short|Horror | tt0000091 |
+---+------------------------------+--------------+-----------+
和船员
^{pr2}$如何创建一个新的数据帧,其中我将导演和年列仅加入电影数据帧(使用tconst column)?在
尝试:
on
参数告诉函数要在键tconst
上合并,how
参数告诉函数如何处理两个数据帧之间不相交(共享)的行。在相关问题 更多 >
编程相关推荐