array(['Meadow (Half Sheed Tara 20%)', 'Meadow (permanent meadow)',
'Forest', 'Infrastructures', 'Meadow special area',
'Meadow special area/S28-1 poor meadows and fen meadows',
'Meadow (permanent meadow)/S28-1 poor meadows and fen meadows',
'Pasture', 'Hedges',
'Meadow special area/S28-2 species-rich mountain meadows',
'Waterbody', 'Other Areas',
'Meadow (permanent meadow)/S28-2 species-rich mountain meadows',
'Grain',
'Meadow (half-sheared)/S28-1 poor meadows and fen meadows',
'Berry fruit (without strawberry)', 'Alpe (without tare)', 'Apple',
'Alpe (stocked 20%)', 'Alpe (stocked 50%)',
'Field vegetable cultivation', 'Meadow (half-sheared)',
'Willow (Tare 20%)', 'Viticulture', 'Corn', 'Meadow (Permanent Meadow Tara 20%)', 'Alpe (tare 70%)',
'Pasture (tare 20%)/S28-6 Wooded pastures',
'Pasture (tare 50%)/S28-6 Wooded pastures',
'Lawn special area (tare 20%)', 'Apricot',
'Meadow special area (tare 20%)/S28-4 Meadows rich in wooded species',
'Meadow special area/S28-4 Species-rich meadows with trees']
Например, я хочу свернуть все классы объектов «Луг*» в один уникальный класс под названием «Сельское хозяйство», а все классы «Пастбища*» — в другой класс под названием «Культивируемые». "
После этого шага я хочу сохранить результат как новый файл формы.
Есть предложения?
У меня есть шейп-файл, содержащий различные классы объектов, которые я могу прочитать [code]import geopandas as gpd
vec_data = gpd.read_file("map.shp") vec_data.head() vec_data['DESCR_ENG'].unique() [/code] Я получил следующий результат: [code]array(['Meadow (Half Sheed Tara 20%)', 'Meadow (permanent meadow)', 'Forest', 'Infrastructures', 'Meadow special area', 'Meadow special area/S28-1 poor meadows and fen meadows', 'Meadow (permanent meadow)/S28-1 poor meadows and fen meadows', 'Pasture', 'Hedges', 'Meadow special area/S28-2 species-rich mountain meadows', 'Waterbody', 'Other Areas', 'Meadow (permanent meadow)/S28-2 species-rich mountain meadows', 'Grain', 'Meadow (half-sheared)/S28-1 poor meadows and fen meadows', 'Berry fruit (without strawberry)', 'Alpe (without tare)', 'Apple', 'Alpe (stocked 20%)', 'Alpe (stocked 50%)', 'Field vegetable cultivation', 'Meadow (half-sheared)', 'Willow (Tare 20%)', 'Viticulture', 'Corn', 'Meadow (Permanent Meadow Tara 20%)', 'Alpe (tare 70%)', 'Pasture (tare 20%)/S28-6 Wooded pastures', 'Pasture (tare 50%)/S28-6 Wooded pastures', 'Lawn special area (tare 20%)', 'Apricot', 'Meadow special area (tare 20%)/S28-4 Meadows rich in wooded species', 'Meadow special area/S28-4 Species-rich meadows with trees'] [/code] Например, я хочу свернуть все классы объектов «Луг*» в один уникальный класс под названием «Сельское хозяйство», а все классы «Пастбища*» — в другой класс под названием «Культивируемые». " После этого шага я хочу сохранить результат как новый файл формы. Есть предложения?