Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/306.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在python中水平连接字符串数组的每一行?_Python_Pandas_Numpy - Fatal编程技术网

如何在python中水平连接字符串数组的每一行?

如何在python中水平连接字符串数组的每一行?,python,pandas,numpy,Python,Pandas,Numpy,这是一个numpy字符串数组 Column 1 Column 2 Column 3 A B C a b c A B C a b c 我希望水平连接每一行,并派生一个具有相同行号的新数组,如下所示: Column 1 ABC abc ABC abc 谢谢。如果不使用熊猫,还有其他方法吗

这是一个numpy字符串数组

Column 1      Column 2      Column 3
A             B             C
a             b             c
A             B             C
a             b             c
我希望水平连接每一行,并派生一个具有相同行号的新数组,如下所示:

Column 1
ABC
abc
ABC
abc

谢谢。

如果不使用熊猫,还有其他方法吗?尽管如此,还是要谢谢你