答案 0 :(得分:2)
您可以transpose
数据框:
data_pivot = data_pd.T
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.transpose.html
答案 1 :(得分:2)
您只需添加.T :) df.describe()。T即可转置结果:
import pandas as pd
import numpy as np
#Create a Dictionary of series
d = {'Name':pd.Series(['Alisa','Bobby','Cathrine','Madonna','Rocky','Sebastian','Jaqluine',
'Rahul','David','Andrew','Ajay','Teresa']),
'Age':pd.Series([26,27,25,24,31,27,25,33,42,32,51,47]),
'Score':pd.Series([89,87,67,55,47,72,76,79,44,92,99,69])}
#Create a DataFrame
pd.DataFrame(d).describe().T
结果:
答案 2 :(得分:0)
其他方法是 <writer id="indexer_solr_1" class="org.apache.nutch.indexwriter.solr.SolrIndexWriter">
<parameters>
<param name="type" value="cloud"/>
<param name="url" value="http://localhost:8983/solr"/>
<param name="collection" value="nutch"/>
<param name="weight.field" value=""/>
<param name="commitSize" value="1000"/>
<param name="auth" value="true"/>
<param name="username" value="solr"/>
<param name="password" value="password"/>
</parameters>
<mapping>
<copy>
<!-- <field source="content" dest="search"/> -->
<!-- <field source="title" dest="title,search"/> -->
</copy>
<rename>
<field source="metatag.description" dest="description"/>
<field source="metatag.keywords" dest="keywords"/>
</rename>
<remove>
<field source="segment"/>
</remove>
</mapping>
</writer>
:
.transpose()