我想在Python中使用dask将csv导入数据帧时命名列。我使用的代码如下所示:
SSLContext sslContext = SSLContext.getDefault(); HostnameVerifier allowAll = new HostnameVerifier() { @Override public boolean verify(String hostName, SSLSession session) { return true; } }; Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create() .register("https", new SSLConnectionSocketFactory(sslContext, allowAll)) .build(); PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(socketFactoryRegistry);
我想使用一个名为每列的数组:
names = ['tribute', 'percent_countries_active', 'num_wars', 'num_tributes', '战争', 'war_to_tribute_ratio', 'US_wealth', 'UK_wealth', 'NZ_wealth' ]
这可以直接做吗?
答案 0 :(得分:2)